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!
This is great. Can you now show us to sync or replicate the data (and what data to sync) on both servers?
@info+digitalocean: Here is an article on setting up GlusterFS to share data between droplets: https://www.serverstack.com/blog/2013/01/25/using-glusterfs-on-your-managed-server/
Great tutorial, will try it out on my php/mysql application.
Right now I am running on a 32gb server, and will try to add another 8gb droplet for my databse.
Right now I have Varnish/memcache/APC/mysql/phpmyadmin/postfix installed.
If I add a second server should I install varnish/memcache/APC/mysql/UFW/fail2ban on it aswell? Will also follow this tutorial on Master - Master https://www.digitalocean.com/community/articles/how-to-set-up-mysql-master-master-replication
Also, is here a tutorial on cluster install for ubuntu?
@ken.thul: It depends on how you set up your cluster. You should usually install apc/ufw/fail2ban on both servers and mysql/memcache on a separate server accessible by both servers.
Hello, I am building a realtime application, for the purpose of this question think of it as a chat application.
I would like to seperate the webservers from the database and “autoscale” the infrastructure:
Additionally these droplets could be located over a variety of locations, and users would be connected based on both load and location. (scaling could possibly be done per location, depending on the size of the app)
Additionally I would consider a master-master sync of my database server for the sake of uptime guarantee. I would then have one Amsterdam droplet, and another USA location droplet)
Any ideas or experience with autoscaling?
@robert: <blockquote>1) webservers: I would like to horizontally scale them (add another droplets when resource usage exceeds 80% and remove a droplet when resource usage drop below 40%)
Additionally these droplets could be located over a variety of locations, and users would be connected based on both load and location. (scaling could possibly be done per location, depending on the size of the app) </blockquote>
Check out <a href=“https://www.digitalocean.com/community/articles/how-to-scale-your-infrastructure-with-digitalocean”>https://www.digitalocean.com/community/articles/how-to-scale-your-infrastructure-with-digitalocean</a>. You can also use Amazon Route 53 or any other DNS service that supports GeoDNS.
<blockquote>2) database server: I would like to vertically scale this one (increase resources when usage exceeds 80% and decrease resources when usage drops below 40%)
Additionally I would consider a master-master sync of my database server for the sake of uptime guarantee. I would then have one Amsterdam droplet, and another USA location droplet) </blockquote> Unfortunately you won’t be able to do that since we require the droplet to be powered off in order to resize it however you can add more masters if need be.
I had to remove the php portion to get this to work. Mine simply has
server { listen 80; server_name www.domain.com;
return 301 https://$server_name$request_uri;
}
server { listen 443;
ssl on;
ssl_certificate /etc/ssl/nginx/server.crt;
ssl_certificate_key /etc/ssl/nginx/server.key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers ECDHE-RSA-AES256-SHA384:AES256-SHA256:HIGH:!MD5:!aNULL:!eNULL:!NULL:!DH:!EDH:!AESGCM;
ssl_prefer_server_ciphers on;
root /var/www/default;
index index.html index.htm;
location / {
proxy_pass http://nodes;
}
}
It seems to me that load balancing would cause issues with differing PHP Sessions unless they’re stored in a replicating database or on a different network share. Does load balancing reduce the usefullness of PHP sessions?
In Step 1, the first server block (for the load-balancer) includes a location block for php scripts. Why?
I would think you wouldn’t want the LB virtual host to run any scripts, just to pass them to one of the web server nodes.