Scaling your laravel app

Draft Disclaimer: Please note that this article is currently in draft form and may undergo revisions before final publication. The content, including information, opinions, and recommendations, is subject to change and may not represent the final version. We appreciate your understanding and patience as we work to refine and improve the quality of this article. Your feedback is valuable in shaping the final release.

Language Mismatch Disclaimer: Please be aware that the language of this article may not match the language settings of your browser or device.
Do you want to read articles in English instead ?

  • rumors of not scaling
  • vapor for serverless solution
  • this is do it yourself series so we are going to explore how to we can manage it
  • managed services would be the recommended way to go unless you have a good reason not to (ie costs, custom requirements/compliances need)
  • load balancer
    • introduce data availability issues
    • one server for each service available across app
    • nginx as node balancer for any services
      • nginx for 4 web server running laravel
      • 4 ec2 running mysql - 1 master, 3 replicas
        • AWS RDS
      • 2 ec2 running redis - for caching layer
        • AWS elastic cache
      • 2 ec2 running minio
        • AWS S3
      • 2 ec2 running redis for queuing
        • AWS SQS
    • scheduler to run on a single server instead of all to avoid duplicates
    • security benefits
      • servers only accessible by load balancer
      • restrict servers inbound/outbound access to only the load balancer
      • exception to
        • load balancer port 80
        • ssh 22 to world
  • deployment
    • multiple servers
    • AWS code deploy
    • other options: laravel envoyer