We’re using Amazon Elastic Beanstalk with a Clojure-based collector.
We used to have an M1.small instance but since the number of tracking events have been growing it was replaced with an M4.large EC2 instance.
This current instance has 450 Mbps bandwidth and also Enhanced Networking by default, also has 8GB RAM and 2 vCPUs.
The action taken by the collector seems relatively simple: log the event, in case of click action, redirect to the indicated URL, in case of open action, serve a pixel.
The problem? We’re facing a huge bottleneck.
We’ve compiled some benchmarks that can illustrate the huge TTFB (Time To First Byte) when clicking on a tracking URL:
M1.small - 58.02ms (2.2 req/sec)
M4.large - 1.05s (9.2 req/sec)
M1.small - 56.13ms (5.4 req/sec)
M4.large - 7.60s (17.0 req/sec)
M1.small - 88.27ms (3.2 req/sec)
M4.large - 7.77s (13.7 req/sec)
M4.large - 110.33ms (5.5 req/sec)
It is impractical that you click on a link and have to wait 7 seconds until something finally happens!
Can anyone helps us by-pass this situation?