📜 ⬆️ ⬇️

New championship for backend-developers: HighLoad Cup


Competitions for IT specialists are now in vogue: Kaggle with its tasks in Data Science, a solid party of Olympiad programming, platforms for artificial intelligence that are gaining popularity, all sorts of hackathons for mobile developers, Olympiads for admins, and capture the flag for security guards. It would seem that it is easy for a specialist in any sphere to find a suitable movement for himself, to participate, pump and win something.


In this regard, only web developers are left out. We at Mail.Ru Group decided to correct this unfortunate misunderstanding and now we are happy to present you HighLoadCup - a competitive platform at the junction of backend-development and administration of web-services.


If you consider yourself a good web developer, you know how to deploy and highload - welcome!


Terms, prizes


Immediately about the main thing - the first, the pilot championship started yesterday, on the 10th of August, and will last until the end of the summer - on the 31st of August we will summarize and present the prizes. The prize pool includes Apple iPad Air 2 Cellular 16 GB for first place, WD MyCloud 6 TB for second and third place, WD MyPassport Ultra 2 TB for places 4 to 6 inclusive. By tradition, the TOP-20 participants will receive T-shirts with the symbols of the championship.


Championship mechanics


Participants are given the task of writing a small web-service that works with the data of a certain structure and implements the API to this data. The container with the implemented service is uploaded to us on the server, where we start it and begin to fire HTTP requests. Based on the results of such attacks, we calculate the number of correct and incorrect answers, RPS and response speed, and a rating table is formed according to a predetermined metric. The author of the fastest and fault-tolerant service and turns out to be a winner.


How does it work


Solutions are sent using a locally installed docker client to a special storage. Then the service sent to us is checked automatically by the CodeHub-CodeRunner system developed by the employees of the Mail.Ru Group Technopark laboratory.


When designing a solution, the participant is not limited to anything; you can use absolutely any languages ​​and technology stacks, from classic scripting language schemes and a DBMS to self-written bicycles in C that hold all the necessary data just in memory.


So actually you need to do the following:



All solutions run as docker containers on identical servers with Intel Xeon x86_64 2 GHz 4 cores, 4 GB RAM, 10 GB HDD.


Fire system



The verification system was originally created for another championship (which we still have to launch;) and was finalized for holding Highload competitions. Inside it runs a yandex-tank with a phantom engine, which conducts shelling in several streams with a linearly growing load profile. Previously, prior to the commencement of the shelling, a user solution has a time on the order of several minutes in order to process data from the JSON file we have planted. Correct work with this data is a necessary condition for victory. There are two types of verification - express verification and rating verification. About this below.


How solutions are checked


Types of verification solutions: rapid shelling and rating verification.


Express shelling is available an unlimited number of times per day, amounts to about 1/10 of the rating check of the solution. Express check does not differ from the rating structure, but uses a different data set and is a way to find out if the solution is ready for a rating check. It is assumed that the rapid shelling takes no more than 3 minutes.


Rating check is performed in the same way as express check, just on more data and queries. Like this:



Thus, the ability of the participant to decompose the data into the necessary structures is first checked. In the first phase of the shelling, the service is checked with an initial light load. In the second, the correctness of the data service update and possible cache invalidation (if the solution needs them). In the third phase of the bombardment, we gradually increase the load in order to feel the solution for strength.


According to the results of the rating check, the participant takes certain places in the leaderboard of the current championship. Total shelling lasts about 15 minutes (in the absence of a queue). Total requests in the shelling: 162 090. Perhaps during the championship this number will increase.


The participant's solution is the docker container, which is obtained using the docker build command. The maximum size of the container on the disk should not exceed 5 GB. The verification system will do docker first and then docker run. If successful, shelling of the decision will begin. A participant can use any server technologies, languages, frameworks at his own discretion (C ++, Java + Tomcat, Python + Django, Ruby + RoR, JavaScript + NodeJs, Haskell or something else). Also for data storage: MySQL, Redis, MongoDB, Memcached - everything you can get into the docker.


As a result of the shelling, logs and metrics are obtained, which will then be shown to participants in the form of graphs on the solution page. The following metrics are tracked separately:




The rating of the decision is considered as follows: we take the time of all the correct answers that the API managed to give during the shelling. We add to this the penalty time for each incorrect response or request, the answer to which we could not get (the penalty time is always equal to the total timeout of the request). The participant, the total time of which will be less than the others, is higher in the leaderboard and has a chance to become the winner of the championship.


Task


In the task of the first championship, participants need to write a fast server that will provide a Web API for the travelers service. In the initial data for the server there are three kinds of entities: User (Traveler), Location (Visit), Visit (Visits). Each has its own set of fields. You must implement the following queries:



The maximum penalty time for a request is equal to the timeout and is 2 seconds (2k microseconds). Immediately before launching, we enclose data in JSON format in the container with the service (they will be available in / tmp / data). The solution is given some time in order to subtract this data and distribute it to internal structures (say, decomposed into a database).


HTTP requests come to a raised container on port 80, with the Host: travels.com header using the HTTP / 1.1 protocol, one request - one connection. Network losses are completely absent.
You will find a more detailed description of the task, a mini-tutorial for a quick start, and other supporting materials on the championship website . In addition, come to our Telegram , they are always happy to answer questions.


Register, win! Good luck!


')

Source: https://habr.com/ru/post/335384/


All Articles