I have participated in ISUCON10! It was a very meaningful experience because it was my first time to participate in such a contest (competitive programming)! In this article, I would like to introduce my own experience and what ISUCON is all about.
Contest to speed up nicely (** I ** ikanjini ** S ** peed ** U ** p ** CON ** test) Abbreviation for **, a tuning battle that speeds up the subject Web service to the limit within the specified regulations **.
Participants only speed up the Web system given as the theme for a limited time (** 8 hours !! **) We are committed to ** how to read, understand, and improve performance of the entire system **.
It is divided into a qualifying round and a main round, and only 30 teams out of the total will win the qualifying round, which is the outpost! ** ** Recently, with the participation of students, it is further divided into general and student slots. ** General 25 teams **, ** Students 5 teams ** will be selected.
** The winning prize is 1 million yen! It is a generous tournament called **.
It has been held 10 times in total so far, and this time it was the 10th time to commemorate: clap:
Online qualifying language ratio
The overall ranking of utilization rates is as follows.
Go 276 pairs 59.0%
Ruby 81 pairs 17.3%
Python 47 pairs 10.0%
Nodejs 29 pairs 6.2%
PHP 18 pairs 3.8%
Rust 8 pairs 1.7%
Perl 7 pairs 1.5%
Elixir 1 set 0.2%
original-ruby 1 set 0.2%
We will work on the problem by forming a team of 1 to 3 people.
Orthodox configurations such as apps, infrastructure, analytics & command
Use your own benchmark to measure your score
Any means can be used, so the key is to calculate the high score score below with the benchmark. * Do not mess with the benchmark.
A website called issumo where you can search for chairs and properties, purchase and request materials ** was given as a problem this time. The main functions were as follows.
etc...
This time, there was no processing such as login, so I think it was a purely problem of figuring out what the system bottleneck was. Personally, the search was amazing, especially by tracing! The UI that displays the property information within the range from the latitude and longitude of the traced range was good ...!
Initial operation check of the application
I was in charge of the app part, so after the competition started, first check the operation of the app
This time, I could only access via the bastion server and could not connect well, so I decided to step on.
afterwards
Infrastructure teammates backed up the source code and managed it with git, so ssh is up to you.
I was reading source code, commenting for each function, and writing endpoints.
DB (around mysql)
I found that the DB was like a bottleneck, so I put an index on it and repeated the measurement with explain.
However, even if I put an index, the result did not change, and I was wondering what happened: expressionless:
Consulted with the team and replaced what originally worked with mysql5.7 with mysql8 >> The result was that the initial score was halved: scream:
I was worried that turning the bench marker would initialize the data and the index would disappear, so I suggested adding it to the table definition in schema.sql.
SQL & response improvement
Improved SQL that is COUNT (*)
and SQL that is SELECT *
I've changed the landing page to populate Redis with the query it loads every time and get it from there.
I was rewriting the query that concatenated 5 OR conditions with union, but as a result, the bench did not pass and I gave up ...
If you put it together in this way, you can clearly see that I couldn't move at all on the day. Although I am usually dedicated to the front end, I realized that I am overwhelmingly lacking in knowledge and experience related to the back end. To be honest, I'm really disappointed.
Looking back later, I found it while commenting ** Like search part ** and ** N + 1-like part ** (trace search) ** I was buried in other work **, which is a point of reflection. Also, ** I couldn't think of a way to improve the query, and I was stunned **, so if there wasn't one I think I could move my hand a little more. I don't usually touch Go, so it might be a good idea to make a backend server with Go. In any case, ISUCON was keenly aware of his lack of ability. But it was really fun! It was a good opportunity to acquire various knowledge and languages that I don't usually touch. There was also an implementation in Deno, so I thought it would be ant to use typescript in the backend.
This time, the DB was only a property and a chair, and there was no SQL that JOINed each other, so some teams were doing a rough job of allocating DBs to each! The ideas I can come up with are already amazing. .. .. !!
I thought that the management that gathered what is usually held on Saturdays and Sundays on Saturdays and handled 500 groups of participants was really amazing. Thank you so much: smile:
It is published at http://isucon.net/archives/55025156.html!