Cloud made easy: Get started with Digital Ocean

Build a web presence in minutes with DigitalOcean’s dead-simple cloud service

1 2 Page 2
Page 2 of 2

Build a cluster on DigitalOcean

If your application is successful, you may find yourself with a droplet that can’t keep up with all the traffic. Increasing the size of the droplet can help, but the approach is limited when you need more CPU power.

Using several droplets that act like a cluster is the traditional solution. Several droplets can work together to respond to requests. Many call this process “load balancing”; DigitalOcean uses the term “floating IP address.” When you enable it, all of the traffic that comes into the particular IP address will be spread around the droplets in your cluster.

The first step to creating a cluster requires you have a droplet in place. Go to the main page for the droplet where networking information runs along the top. When you click on “Enable floating IP address,” it will take you to a page for configuring them. From here, you can connect the floating IP addresses to the droplets.

This page will also list all floating IP addresses in case you want to reassign or delete them. It’s a good idea to delete them when you’re finished—unused but assigned IP addresses are charged a small amount per hour because they’re valuable commodities.

Rebuild a DigitalOcean droplet after powering off

The power to your droplets can be turned off, an act that is a bit of a fiction for virtual machines running on a cluster. The host hardware stays on, but the virtual machine is shut off and must be rebooted when it is turned back on.

The best way to shut down a computer is through the operating system. Either of these commands will work from the command line:

sudo shutdown -h now
sudo poweroff

If your droplet becomes wedged or unresponsive, you can also shut it down from the DigitalOcean website, but this action could lead to corrupted data and inconsistent file systems. The Power tab for each droplet includes two options for either rebooting a droplet or shutting it off completely.

When you’ve shut down your droplet, you can resize, reconfigure, or fix it. The droplet can be turned back on by going to the Power tab of the droplet, then pushing the “Power on” button.

Resize a DigitalOcean droplet

When the power is off, the Resize tab of the droplet’s main page offers two options for resizing the droplet. The first merely changes the amount of CPU and RAM devoted to a droplet. It’s a good option when you need more power temporarily because it can be reversed, allowing you to switch back after you’re done.

The second option changes the RAM, CPU, and disk space, a step that can take longer because the disk space must be expanded. This option is not reversible because there’s no simple way to shrink the disk space. If you need to shrink the size of your droplet, you’ll need to create a new smaller version and copy data yourself using a snapshot or rsync.

Rebuild the file system of a DigitalOcean droplet

You can restart many distributions with a recovery kernel after the machine is powered off. This option can be found under the Kernel tab of the droplet’s main page. When you click the button, you can swap out the kernel and restart it. Not every droplet has this option enabled. (It is generally a good idea to keep good backups so that you don’t need to rely on fsck to solve your problems.)

DigitalOcean offers a thorough tutorial on various ways to mount drives and execute standard fsck routines. They also offer the option for rebooting with a recovery ISO that can solve other problems and save data.

Make network changes to a DigitalOcean droplet

You can also adjust the network configuration of your droplet when it is powered down. The Networking tab of the droplet’s main page offers the option to either enable private networking or turn on the public IPv6 access. Both can be configured with a click.

Reset root on a DigitalOcean droplet

If you’ve forgotten the root password or you worry about some kind of compromise, you can reset your root password when the droplet is off. Use the Access tab of the main droplet page.

Related articles

This story, "Cloud made easy: Get started with Digital Ocean" was originally published by InfoWorld.

Join the Network World communities on Facebook and LinkedIn to comment on topics that are top of mind.

Copyright © 2017 IDG Communications, Inc.

1 2 Page 2
Page 2 of 2
IT Salary Survey 2021: The results are in