check out FortRabbit - they use AWS
Laravel website with 1500000 users at the same time
I have to build website with worst scenario there is 150000 users will use the website at same time for 5 hours. All my previous projects don't have this much traffic. Previously I used Heroku to deploy Laravel websites.
***NOTE *** Hosting must be on Amazon AWS.
What things I should use in Laravel and in AWS and what is the best AWS plan to handle this traffic?
For something like this; load balancing. The app can be running on many servers distributing the load. Once that is achieved, it's literally trivial (a few button clicks) to add/remove servers, or have AWS do it automatically with auto-scaling. Like maybe the bulk of your load is during US business hours. You could have 4 (or whatever) app servers running during those times, and only have 1 or 2 during off peak times.
This setup also helps with failover, as there isn't a single point of failure if you set it up right. If an app server goes down, the other servers just pick up the load. You destroy the bad server and bring up a new one with no downtime to your app. That can also be automated.
This type of setup is different from a typical setup. You'd have a separate db server that the other webservers share. You'd use S3 for storing all assets instead of on an individual server, so that all servers (acting as one) has access to the same data. If user A uploads a file to Server A, it needs to be accessible by servers B, C and D as well, so it can't be stored on the individual webserver.
The same goes for sessions. A user might login to server A, but the next request gets served from server B. So you need a common session store that all servers use, like redis.
Now you're just left with dumb webworkers, so you can just add new ones to increase capacity and scale.
Here's a good place to start learning: https://serversforhackers.com/c/so-you-got-yourself-a-loadbalancer
You can also use the Laravel Forge service to manage it all (and set it up). It can create load balancers along with servers.
Please or to participate in this conversation.