shipping-docker / php-app

A containerized Laravel application
278 stars 73 forks source link

Scaling #13

Closed lukasoppermann closed 8 years ago

lukasoppermann commented 8 years ago

Hey @fideloper,

I have another question. So if you have a proxy and want to scale a service. Would you add more nginx webservers? Or would you add more php containers to balance between? Or both?

fideloper commented 8 years ago

Hmmm, so this question is really broad.

It also depends on what you need to scale - web requests for static files? For php requests? Database being hammered?

How you go about expanding your infrastructure depends on your application and even where you're hosting, since things like AWS provide load balancers and other tools you can use.

Tools like Swarm and Kubernetes have network setups that'll distribute requests automatically for you across hosts, but generally there's some sort of load balancer / reverse proxy "thing" in front of an infrastructure. The upside is that generally you can just keep adding hosts to expand scale.