Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

ahmeddabak's avatar

How to best handel 1500 requests a second

In our company, we developed our own cloud web application to gather data from sensors in real-time.

We have the following components:

Laravel 8, PHP 7.4, MySQL 8, Redis 5 used for the queues with horizon, laravel-websockets from beyondcode used to update displays in real-time

Currently, the whole application is hosted on a single droplet on digitalocean, which was not a problem till now, as we currently only receive 16 requests a second from about 40 sensors.

The problem is we need to add another 1000 sensors in December, and we estimate about 1500 requests a second.

We started optimizing our cloud for this high traffic, by hitting the database only when it is really necessary, and using caching when possible, we have also moved all the logic to handle the request from a sensor to a job so that we can queue it and return as soon as possible.

But I wanted to ask the experts here what would they suggest to do, first we want to switch to better infrastructure, like digital ocean kubernetes , or the new app platform, or even something else like amazon aws.

So many options and zero experience with high traffic, what would you suggest.

0 likes
7 replies
bugsysha's avatar
bugsysha
Best Answer
Level 61

Laravel Vapor feels like a perfect choice.

ahmeddabak's avatar

So if we wanted to manage the server our self, your suggestion would be Amazon aws lambada.

bugsysha's avatar

Yeah. But in my mind that does not make sense for a company that has 1500 requests per second to save $39 per month and waste who knows how much time on setup and maintenance.

1 like
ahmeddabak's avatar

You are right, any other suggestions on how to handle all these requests in the code

bugsysha's avatar

You are right, any other suggestions on how to handle all these requests in the code

I would have to know lot more about your code and things that happen in order to say something smart, but considering that you've said:

We started optimizing our cloud for this high traffic, by hitting the database only when it is really necessary, and using caching when possible, we have also moved all the logic to handle the request from a sensor to a job so that we can queue it and return as soon as possible.

I think you are on the right path.

ahmeddabak's avatar

Many thanks for your time and advice, we will start testing with laravel vapor starting tomorrow.

bugsysha's avatar

Please report back how it works out for you and your project. Thanks for "Best Answer" :)

Please or to participate in this conversation.