The main takeaway from this post should be an appreciation for the tools and techniques that can help you to profile and improve the performance of your systems. It is a pretty solid illustration of the power of compounding when doing optimization work. It shows the percentage improvement for each optimization, and the cumulative throughput in requests per second. The table below lists the nine optimization categories that I will cover, and links to the corresponding flame graphs. The global pandemic gave me some extra time, so I decided to dive in head first. I started off working on a largely unrelated blog post, but I somehow found myself going down this optimization rabbit hole. Hitting 1M+ req/s wasn't actually my original intent. Instead, we will mainly stick to the happy path, moving steadily from serving 224k req/s at the start, with the default configuration, to a mind-blowing 1.2M req/s by the time we reach the end. For the purposes of this recreated quest, we will ignore most of the dead ends and dark alleyways that I had to struggle through on my solo expedition. This post will walk you through the performance tuning steps that I took to serve 1.2 million JSON "API" requests per second from a 4 vCPU AWS EC2 instance.
0 Comments
Leave a Reply. |