When you create an environment for your application, you can leverage the advantages of the various SpinUp products to improve performance, optimize costs, and eliminate downtime. This article provides a high-level overview of some of the options available when you create your environment.
Avoid “one-box wonder” syndrome
When you use the cloud, you should avoid attempting to run your entire environment on a single Cloud Server. Why? Such a design does not leverage the many advantages of cloud hosting beyond lower cost. Also, running on a single Cloud Server means the entire environment has a single point of failure. If and when something goes wrong with that Cloud Server’s hardware, hypervisor, or operating system (OS), then the entire application is down.
Instead, you should break out your application across multiple devices. A common example of this is to have a front-end web Cloud Server with a back-end database Cloud Server to run a website. If a device within this type of environment has an issue, only that device’s function is impacted. We recommend this method, combined with redundancy, to reduce or eliminate the impact to the end users of the application.
Use a Load Balancer to manage traffic and allow easy redundancy
SpinUp Load Balancers provide a load balancing solution for your front-end. Load Balancing is exactly what it sounds like - a method to distribute requests to multiple Cloud Servers that can respond.
Basically, a request comes in via the Internet Protocol (IP) address assigned to the Load Balancer. The Load Balancer then forwards the request to one of the nodes (usually a Cloud Server) assigned to it. The node processes and replies to the request, and the response is then forwarded to the user by the Load Balancer.
This type of environment has three key advantages. The first is easy redundancy. SpinUp Load Balancers are high availability devices by default, so they remain up. By using two or more Cloud Servers behind the Load Balancer, you add redundancy to your web or application nodes as well. If a failure occurs on one of the Cloud Servers, the Load Balancer automatically routes traffic to the remaining healthy nodes, keeping your application running for the end user.
Another advantage of using a Load Balancer is built into the name - it manages and distributes the load coming into your site or application. This enables you to service an application or site from multiple devices and spreads the load among those devices. You can also maintain your uptime and response times, even when servicing higher than normal traffic, by horizontally scaling your application.
The third advantage that a Load Balancer offers is a static IP address. The IP address of a Load Balancer never changes unless you delete it, which provides a lot of flexibility in troubleshooting or altering your environment and application. Because the IP address is static and all requests point to that IP address, you can remove, replace, or take nodes out of rotation for maintenance behind the Load Balancer without bringing the application down and without the need to make DNS changes.
Leverage SpinUp Databases to simplify your backend
Instead of leaving your database on one of your web nodes or having to deal with keeping additional Cloud Servers maintained to run it separately, you can use SpinUp Databases. Database engineers maintain the hardware and operating system (OS) for this service, which frees you from having to maintain nodes for your database while still offering all the benefits of a relational database.
SpinUp Databases also offer easy set up of high availability database clusters for increased performance and redundancy, which removes the complexity of setting up a cluster yourself so you can focus your efforts elsewhere.
SpinUp Databases will be available in early Q4, 2019.
A sample environment
Let’s put all this advice together in an example environment. For this design, we’ll assume the infrastructure is built out to support a low to moderate traffic website.
First, we would procure a Load Balancer to obtain a static IP address. We place two Cloud Server web nodes behind this Load Balancer to act as our front end. Then we create a high-availability SpinUp Database cluster to act as our backend. You can see this setup in the topology diagram below:
This setup has no single point of failure. A web server might fail, or a database in the cluster might fail, but the infrastructure remains up and able to take and process new requests successfully. The Load Balancer has built-in redundancy maintained by SpinUp, and as such it is also protected against hardware failure.
This example also has many performance benefits built in. Multiple web servers and a clustered database enable more requests to be processed at a time because the requests are spread out among the environment’s resources. These advantages mean faster response times for the end users, leading to improved experiences.
Finally, this setup is primed for expansion. You can create additional Cloud Servers and add them to the pool of web nodes behind the Load Balancer, or you can add additional replicas to the SpinUp Database cluster within minutes. Doing so enables the environment to scale rapidly to meet the demand of traffic spikes, as well as scale back down after those events subside.
SpinUp recommends keeping these considerations in mind when you architect your environment. Following these guidelines leads to an infrastructure for your website or application that performs faster, with unprecedented uptime, all while reducing cost when compared to a bare-metal solution.
Going forward, we recommend reading the Getting started, Best practices, and FAQ articles for the products described in this article. Reading these articles gives you a better idea about how to use these products, as well as how they can benefit your solution.