While serving a huge amount of requests, we can easily observe that our traffic graph looks like a sine wave with a high rate at midday and a lower rate at night. The difference is relatively big, around 2–3 times more requests in the rush hours. Moreover, there are special occasions such as Black Friday, Cyber Monday, sale campaigns, etc, that our traffic can raise up to x3.
Using Kubernetes’s elasticity…
Here at Dynamic Yield we are serving thousands of HTTP requests per second. Moving our serving services from EC2 to EKS required some tuning to ensure we could serve efficiently without losing any request. I summarized some tips and I hope it might help others with a smooth transition.
Kubernetes can decide to proactively replace pods (replicas) of our application, whenever:
Celery communicates via messages, usually using a broker to mediate between clients and workers. We are using RabbitMQ as the broker.
Our system we have ~30 different celery tasks such as:
There’s a huge variety between those tasks: some of them can run for seconds while others can take hours, depends on the data (size) being processed and…
Elasticsearch is being used in a lot of companies as a great search-engine thanks to its speed and scale. At Dynamic Yield, we are using Elasticsearch as part of our recommendations engine and handle thousands of requests per second.
Elasticsearch cluster contains several nodes that can play one or more roles: master, data, ingestion, etc.
Indices are being stored in the data nodes.
Each index can have one or more shards, usually determined by the index size.
Each shard holds part of the index data (documents), so if for example, we have an index with two shards, each shard holds…
Principal Engineer at Dynamic Yield