I joined Isucon10 as a good luck power-in team with my colleague ToshihitoKon. The origin of the name is the inner ring material that was popular in the company for a while w
In the first year of my new graduate last year, I was too busy to participate, so I was able to afford a little in the second year and I will participate this year! So I tried to participate in the war. The first ISUCON!
We have a legend who has won the ISUCON several times and has questions, but if possible, I would like to team up with members of the same level to know my position, so I decided to use Toshihito Kon as a team member. I invited you. I had a lot of opportunities to work together, so in that sense it was easy to communicate and it was fun.
ToshihitoKon had a strong infrastructure, so I asked for the infrastructure, and I proceeded with the division of roles devoted to the application. The language used is Go.
I tuned the ISUCON9 qualifying by running it on my Mac's local docker. http://isucon.net/archives/53805209.html
I also looked at the blogs that gave high scores in the past and used the strategy as a reference. https://to-hutohu.com/2019/09/09/isucon9-qual/#%E5%BD%93%E6%97%A5
As a result, I thought that I was not very familiar with how to use ʻalp
pt-query-digest`` Nginx`, so I tried to analyze the access log and slow query log based on the ISUCON9 qualifying. I was doing it.
After that, the standard Make a competition, prepare the git repository in advance, and so on.
Personally, I didn't understand Nginx enough, so I read through the following books. It was very helpful. Introduction to nginx practice WEB + DB PRESS plus
In the past questions of Isucon9 qualifying, I was able to get close to 10,000 points at hand, so I decided to go to the day. I stayed at Toshihito Kon's house the day before and had a pizza party, and I was able to enjoy it like a festival lol
ToshihitoKon was able to finish the infrastructure settings smoothly, so I was able to concentrate on tuning the app. ToshihitoKon will take care of DB settings and multiple device configurations, and tune the app.
--Reading the regulations carefully --For the time being, I decided to write a regular expression on the Nginx side to repel the bot ――I was very happy that the results of Nginx's studies came out immediately. --After that, read the DB structure and application to understand the whole ――I was surprised that the application and DB were very simple. The competition has progressed because it is a mechanism that allows you to concentrate on the problem! ――I just stared at the log and put an index, and identified a slow endpoint. ――By all means, the search for chairs and real estate is slow. --I tried to put the index for the time being --In many cases, the index could not be pasted as it was, so try changing the application, etc. --I tried to change the order by on the DB side to sort by myself
I got a score of about 650 around here, but it has been sluggish since then ... Looking at other teams, it seemed that we had to eliminate the critical bottleneck.
I thought that there were two options, tracing to speed up the search or on-memory cache, so I tried the on-memory cache that I had studied in advance, but I could not completely eliminate the bugs and could not introduce it. ... I'm sorry!
As a result, I finished with about 650 points.
http://isucon.net/archives/55025156.html Looking at the comments, I thought it was important to try to speed up the search by tracing.
Also, I could only think of a strategy to implement the search on the application side by making the place where the search is complicated into an on-memory cache, but there was also a way to put an index on all the search conditions normally.
index I thought it was not good to put it in the dark clouds, but I should have tried it once before making a decision. Don't just guess, measure it.
Also, I knew the problem that the index did not work due to sorting in descending order and ascending order, but it is very much better to add a new column to deal with this! have become.
I also noticed that the bulk insert speed was increased, but I didn't access it as much as I saw the log, so I left it. Perhaps once the bottleneck is resolved, that will become a problem next.
When I usually work, I have a lot of work that is closer to applications, and I didn't have to write Nginx settings from scratch, so I feel that it was very good that I gained a lot of knowledge about infrastructure by participating in ISUCON. I will!
Also, in my current job, I spend an overwhelming amount of time reading code and thinking about designs based on existing specifications, and I regret that I lack the ability to move my hands and write code **. ..
Even after reading the commentary, it seemed that the bottleneck was identified quite well, so ISUCON clearly felt the lack of implementation power of "how to solve it". Increase the chances of writing code not only in your daily work but also in your private life! It led to the motivation.
Thank you to all the operators for the fun issues! !! I was very impressed with the skill set and attitude of everyone who manages this level of questions and tournaments. I want to devote myself so that I can do that one day. Thanks to Toshihito Kon for joining us again! Like revenge next year!
Recommended Posts