In this post, I want to explore a way to establish 100,000
connections to MySQL. Not just idle connections, but executing
queries.
100,000 connections. Is that really needed for MySQL, you may
ask? Although it may seem excessive, I have seen a lot of
different setups in customer deployments. Some deploy an
application connection pool, with 100 application servers and
1,000 connections in each pool. Some applications use a
“re-connect and repeat if the query is too slow” technique, which
is a terrible practice. It can lead to a snowball effect, and
could establish thousands of connections to MySQL in a matter of
seconds.
So now I want to set an overachieving goal and see if we can
achieve it.
Setup
For this I will use the following hardware:
Bare metal server provided by packet.net, instance size:
c2.medium.x86
Physical Cores @ 2.2 GHz
(1 X AMD EPYC 7401P)
Memory: 64 GB of …
[Read more]