By now everybody knows that one of the major benefits to using cloud services rather than hosting on your own hardware is the ease to scale quickly. Â Many web applications and large companies benefit from this, but what about smaller customers? Â How about a single server?
Well, today one of our web servers was experiencing some pick loads. Â It hosts a whole array of small websites built with WordPress, CakePHP, and other popular tools. Â There was no time to update all these projects to work with multiple web servers. Â And even redeploying them to multiple individual servers would have taken a few hours. Â Instead, we’ve decided to upgrade the server hardware.
Pause for a second and imagine the situation with your own server. Â Or a dedicated hosting account for that matter. Â So much to configure. Â So much to backup and restore. Â So much to test.
Here’s how to do it, if your projects are on the Amazon EC2 instance (our was also inside a virtual private cloud (VPC), but even if it wasn’t, the difference would be insignificant):
- Login to the Amazon AWS console.
- Navigate to the Amazon EC2 section.
- Click on Instances in the left sidebar.
- Click on the instance that you want to upgrade in the list of your instances.
- Click Actions -> Instance State -> Stop.
- Wait a few seconds for the instance to stop. Â You can use the Refresh button to update the list.
- (While your instance is still selected in the list of instances:) Click Actions -> Instance Settings -> Change Instance Type.
- In the popup window that appeared, select an Instance Type that you want.
- Click Apply.
- Click Actions -> Instance State -> Start.
- Wait a few seconds for the instance to start.
- Enjoy!
The whole process literally takes under two minutes. Â You get exactly the same configuration – hostname, IP addresses (both internal and external), mounted EBS volumes, all your OS configuration, etc. Â It’s practically a reboot of your machine. But into a different hardware configuration (CPU/RAM).
Coincidentally, earlier this morning I had to pack up a rack-mountable server – screws, cables, dusty boxes, the whole shebang. Â It’s been a while since I’ve done that last time.
But I can tell you that I much prefer clicking a few buttons and moving on with my day. Â Maybe I’m just not the hardware type.