
[contest] DevOps Brainwashing
In a fast-growing Internet project, when you have to manage a large number of instances every day, infrastructure management usually looks like this: There are

two options for the development of events. Either admins go crazy after 100500 deploying applications to a hundred servers, or they start using the best DevOps recipes. You have the opportunity to take a class course " DevOps for Internet projects ", which is held as part of the Brainwashing courses. The course is taught by people who have been operating for many years in companies such as Skype, Groupon, Buy-Coupon, Oversan-Skalaksi. And here is what they promise:
In 2 days we will analyze the implementation of DevOps in practice. We will teach you to set up a server environment in 5 minutes, make rolling out simple and manageable, configure monitoring so that it helps, not spam. We will explain when to use the clouds and CDN, where it is better to place the project and how not to suffer from the fall of the Martian ship at the data center.
At the same time, this is not two days of lectures, but a master class with consolidation of theoretical knowledge by practice (for this you need to take a laptop with Linux or OS X on board for the course).
The course is paid, however, a place can be obtained for free if the first one answers the following questions as correctly and fully as possible.
1. You have the following in the nginx config:
Rewrite this config as you think should be correct.
2. In the application, you execute some requests on a read-only replica. On especially long requests, the application writes to the log:
Why can this happen and what needs to be done to fix it?
3. Explain in detail what are the features of the asynchronous input-output model (epoll) and multi-thread model (thread pool). In what cases is it more convenient to use one model and in which another? Service with which model would you choose to work with a hard drive?
4. What does tcp do when the receive buffer is full? Imagine that you are the creator of the tcp protocol and how would you solve the buffer overflow problem?
5.You use the deadline IO scheduler and decide to run a script to delete files with a lower priority to disk. After starting, the script loaded the entire disk and began to interfere with other processes. What is the reason?
6. What is the difference between calculating load average values in Linux and Freebsd (or Solaris), how would you yourself make the formula for calculating this parameter?
Responses are accepted until September 19 through this form .
PS Full program of the course.
Day one.A story about approaches and practices, an introduction to the methodology. Infrastructure: servers and clouds, how to choose? Communication channels, CDN - features and pitfalls. How to predict the load, capacity management. Monitoring The first practice is working with vagrant and chef-solo, we are developing the project. How not to lose data and requests to the site - backups and fault tolerance. Configuration management. Features of the initial installation of servers.
Second day.Introduction to Opscode Chef. The second practice is working with knife and chef-server. Chef architecture and Chef-anatomy. Minimum chop course for working with Chef. The third practice is to replace apache with nginx in your infrastructure using Chef. Work with attributes, roles and environments in Chef. Databags and data management. The fourth practice is working with data in Chef. The fifth practice is LWRP, code reuse. Sixth practice - try on workflow work with cookbooks. Seventh practice - features rolling out with a configuration management system.

two options for the development of events. Either admins go crazy after 100500 deploying applications to a hundred servers, or they start using the best DevOps recipes. You have the opportunity to take a class course " DevOps for Internet projects ", which is held as part of the Brainwashing courses. The course is taught by people who have been operating for many years in companies such as Skype, Groupon, Buy-Coupon, Oversan-Skalaksi. And here is what they promise:
In 2 days we will analyze the implementation of DevOps in practice. We will teach you to set up a server environment in 5 minutes, make rolling out simple and manageable, configure monitoring so that it helps, not spam. We will explain when to use the clouds and CDN, where it is better to place the project and how not to suffer from the fall of the Martian ship at the data center.
At the same time, this is not two days of lectures, but a master class with consolidation of theoretical knowledge by practice (for this you need to take a laptop with Linux or OS X on board for the course).
The course is paid, however, a place can be obtained for free if the first one answers the following questions as correctly and fully as possible.
1. You have the following in the nginx config:
upstream fallback {
server 127.0.0.1:80;
}
server {
listen 80;
server_name example.com www.example.com mobile.example.com;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
location /nginx-status {
stub_status on;
access_log off;
}
location / {
proxy_set_header X-Real-IP $remote_addr;
if ($host = 'mobile.example.com') {
rewrite ^ http://example.com/mobile/$uri last;
break;
}
proxy_pass http://fallback;
}
}
Rewrite this config as you think should be correct.
2. In the application, you execute some requests on a read-only replica. On especially long requests, the application writes to the log:
ActiveRecord::StatementInvalid: PGError: ERROR: canceling statement due to conflict with recovery DETAIL: User query might have needed to see row versions that must be removed. : SELECT …
Why can this happen and what needs to be done to fix it?
3. Explain in detail what are the features of the asynchronous input-output model (epoll) and multi-thread model (thread pool). In what cases is it more convenient to use one model and in which another? Service with which model would you choose to work with a hard drive?
4. What does tcp do when the receive buffer is full? Imagine that you are the creator of the tcp protocol and how would you solve the buffer overflow problem?
5.You use the deadline IO scheduler and decide to run a script to delete files with a lower priority to disk. After starting, the script loaded the entire disk and began to interfere with other processes. What is the reason?
6. What is the difference between calculating load average values in Linux and Freebsd (or Solaris), how would you yourself make the formula for calculating this parameter?
Responses are accepted until September 19 through this form .
PS Full program of the course.
Day one.A story about approaches and practices, an introduction to the methodology. Infrastructure: servers and clouds, how to choose? Communication channels, CDN - features and pitfalls. How to predict the load, capacity management. Monitoring The first practice is working with vagrant and chef-solo, we are developing the project. How not to lose data and requests to the site - backups and fault tolerance. Configuration management. Features of the initial installation of servers.
Second day.Introduction to Opscode Chef. The second practice is working with knife and chef-server. Chef architecture and Chef-anatomy. Minimum chop course for working with Chef. The third practice is to replace apache with nginx in your infrastructure using Chef. Work with attributes, roles and environments in Chef. Databags and data management. The fourth practice is working with data in Chef. The fifth practice is LWRP, code reuse. Sixth practice - try on workflow work with cookbooks. Seventh practice - features rolling out with a configuration management system.