In a fast-growing Internet project, when you have to manage a large number of instances every day, infrastructure management usually looks like this:

Variants of events two. Either the admins go crazy, after 100,500 deployments of the application on a hundred servers, or they begin to use the best DevOps recipes. You have the opportunity to take a class course "
DevOps for Internet Projects ", which is conducted as part of Brainwashing courses. The course is led by people who have been operating for many years in companies such as Skype, Groupon, KupiKupon, Oversan-Skalaksi.
And here is what they promise:
')
For 2 days we will analyze the implementation of DevOps in practice. We will teach how to set the server environment in 5 minutes, make rolling out simple and manageable, set up monitoring so that it helps, and 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 on the data center.
In this case, this is not two days of lectures, but a master class with the 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, the place can be obtained free of charge if you are the first to correctly and fully answer the following questions.
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 it should be correct.
2. In the application, you perform some requests on a read-only replica. For 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 should be done to fix it?
3. Expandedly tell what are the features of the asynchronous input-output model (epoll) and the multithreaded model (thread pool). In which cases it is more convenient to use one model and in which other? Service with which model would you choose to work with the 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 IO deadline scheduler and decide to run a script to delete files with low priority to the disk. After the start, 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 make the calculation formula for this parameter?
Answers are accepted until September 19 through this form .
PS Full course program
The first day. The story of the approaches and practices, introduction to the methodology. Infrastructure: servers and clouds, how to choose? Communication channels, CDN - features and pitfalls. How to predict load management capacity. Monitoring The first practice - working with vagrant and chef-solo, we deploy 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-run anatomy. Minimum Ruby course for working with Chef. The third practice is to replace apgin with nginx in your infrastructure using Chef. Working with attributes, roles, and environments in Chef. Data logging and data management. The fourth practice is working with data in Chef. The fifth practice is LWRP, code reuse. The sixth practice is trying on workflow with workbooks. Seventh practice - features roll out with configuration management system.