Best way to autoscale Phoenix apps (app engine?)

Hey all,

I’ve been looking at various ways to deploy Phoenix apps and haven’t been able to come to a conclusion on what the right platform would be to deploy a Phoenix app to if you want autoscaling.

Has anyone here deployed to Google app engine before? I’ve seen some outdated posts about issues with web sockets timing out (app engine has a 30 second timeout) but I’ve also seen stuff floating around with app engine supporting websockets now.

In the current state of things is app engine a reasonable place to deploy Phoenix apps if autoscaling is an important feature for the app? Has anybody tried before?

Thanks in advance for all responses!

I’ve not deployed to any cloud service before, but I heard that Google’s app engine recently got better long-term web socket handling?

Aye, in the same boat here.

Maybe I’ll try deploying a dummy chat app to see how it works :slight_smile:

It’s pretty rare case to see the app where autoscaling is a requirement. You can scale easily vertically, just by upgrading your machine, moving database to separate server and so on.

I know aws/gcp supports autoscaling with some predefined rules but it isn’t wise decision to tie your app to particular service in a long term. I would just go with k8s (which you can self-host on bare metal) if your application is “enterprise scale”. I heard good words about Nomad. If you’re planning to have 1-3 servers I think it’s better to go with just docker swarm and scale manually.

Most easy way to autoscale is to have some robust router as load balancer which will route traffic to bunch of stateless web-servers which will be querying some persistent data from satefull server or it’s replicas.

One thing though support contract is a requirement if you go with services like google cloud (~$200mo), because any time you can get “happy email” to find you application banned automatically by robot and gcloud support is non-existent if you don’t have paid contract for support.

1 Like

Good point - maybe a better approach for the time being than looking to autoscale would be implementing better automated monitoring/alerting and determining when it is time to add another server.