Don’t Use ELB for Internal Connections
We use ELB as HA proxy. There are two of them. One is for write requests and the other is for read requests.
We set up a program to detect status of MySQL replication. According to the status, the program will change ELB’s configuration to let them connect to right MySQL servers.
But in the performance test, we find our application is slow. MySQL server side has litter pressure, so the bottleneck is not database. When we turn to application itself, we find out that every application server can only handler 100 requests per second. Those requests are very simple ones, which do nothing but fetch one record from MySQL by primary key. We can enhance our capability to handle requests by adding more application servers, but that is not economic at all. 100 requests per second, even my laptop can do better than this.
Yesterday Amazon guy came here to share new products. He was very curious about our usage. And soon he found out that we are using ELB for internal connections.
He was astonished, because ELB will transfer data through internet. Not only we will be changed for extra internet usage, but also there will be a big network delay!
He suggested us to use HAProxy instead of ELB for internal connection. But it is not easy to change our architecture now.
Is there anyone suffering from same problem? Please stop using ELB improperly.
Tags: AWB, bad, ELB, MySQL Performance