Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Really nice series. What about storage? If you have two or more application servers, you need to make sure that file uploads for example are acessible to all app servers. The easier way is to use something like Amazon S3 but would be great if you could make a tutorial about using other DO Droplets as Storage Devices using something like GlusterFS, NFS or whatever is more appropriate.
@brunopaz: S3 is an option. We also have a couple of articles on storage cluster servers:
if i have nginx on droplet A, and 2 app servers on droplet B and C respectively, everything is working great except i get 404’s whenever its serving rails assets.
i then moved the app server to droplet A, which has nginx on there, and don’t have any issues with the assets (im guessing because nginx is finding the assets on droplet A now that the app server is there too).
is there something missing from my configuration for assets?
right now i have the following in my nginx conf:
location ^~ /assets/ {
gzip_static on;
expires max;
add_header Cache-Control public;
}
i know i could configure my rails apps to serve from s3, etc, but im curious what is causing the issue in the first place
Do I need to deploy my rails app on every app server? From my understanding, I could have nginx on server A balancing server A and server B, and rails installed on server A only, is this correct? Thanks
@delossantos.franklin: Yes, you will need to deploy your app on all of the app servers. But you only need to install nginx on one server.
What about the session data? Can they shared among droplets? Eg. I logged in in drop A, then subsequent request redirects to drop B. Will drop B able to find out my session?
This is cool. You could also put the app servers in a bunch of containers. Then just point the nginx server to multiple ports.
Thank you for the tutorial but it seems odd to have a tutorial titled “How To Scale Ruby on Rails Applications Across Multiple Droplets” that only uses one server in the example.
You can’t know what issue you’ll run into when setting up multiple servers until you actually try to set it up on multiple servers so the example should use at least three different servers: one for Nginx, one for Unicorn/Rails, and one for the database.