Clearpath Insights: Managed Services | Cloud Services | IT Solutions

7 Best Practices for Building in the Cloud

Imagine a man on a road crew was given the job of painting the yellow lines down the middle of a highway. On his first day he managed to paint six miles of lines on the highway; the next day he managed to knock out three miles; and the following day he was only able to cover less than a mile. Frustrated with the decrease in performance day over day, the company foreman asked the man why he kept painting less each day. The man replied "I just can't do any better. Each day I keep getting farther away from the paint can."

I think we can all agree that leaving the paint can at the beginning of his length of highway to paint was not the best approach to get the job done. But maybe, just maybe, if he had been provided a little guidance and some best practices, he would have approached his task more effectively.

Today, more and more companies are launching initiatives to move to the “cloud” in record time in order to stay competitive in their market space. Often, no time is afforded to really learn proper patterns in this new cloud age to build successful, resilient architectures that meet customer demand and control costs. So, I thought it would be helpful to share 7 best practices for building in the cloud to help you avoid starting from the beginning each time like our friend on road crew.

First and most importantly in my mind, design for failure and nothing will fail. Do everything you can to avoid single points of failure and always, always assume everything fails. Then design backwards from that assumption to create a resilient environment for your company and its customers. Treat it like a game. The goal of the game is simple; that your applications should continue to function even if the underlying physical hardware fails, is removed or even replaced. If an individual component in your architecture fails, your application should never follow suit. Amazon Web Services provides a great option to deploy your application in multiple datacenters and load balance traffic between the datacenters, and yes I said load balance between datacenters, not between racks in the same datacenter.

Secondly, loose coupling sets you free. It is important to design architectures with components that do not have tight dependencies on one another. Essentially, this helps isolate the various layers in your application so that each component interacts with the others without any knowledge of them, as if they were a “black box”. But why go through this? It seems like so much more work! Think scale, the more loosely coupled your design is, the bigger and better they can scale.  Message queues are a great way to implement decoupling from an application perspective.

The third best practice is to implement elasticity. Lets take AWS for example; elasticity is a fundamental property of its value proposition.  The elastic nature of AWS allows you to automatically add and remove compute capacity as necessary to meet your workload demand.  It shifts the focus from the health, availability, or the fixed location of any specific server in favor of a horizontally scaling pool of common servers in various tiers of your architecture. Elasticity is found in almost every offering provided by AWS and all at the end of a simple API call.

Making sure you build security into every layer of the application is the fourth best practice to remember. A variety of security measures and best practices are common between traditional on-premise and public cloud environments. By applying the principle of least privilege to your applications and architecture, you can establish a sound defense for each layer of your footprint. Remember to reduce your attack surface by explicitly control inbound and outbound traffic by protocol, port and IP address where appropriate using software and/or host-based firewalls and intrusion detection systems. Increase the protection of your corporate and customer data by implementing encryption for data in transit and at rest.  Always keeping security at the forefront of your cloud design will help mitigate your risk to potential exposure. 

Our fifth best practice is simply to not fear constraints. What does that mean? Well, with virtually infinite capacity in public clouds like AWS, means that more RAM, compute, storage, network bandwidth, IOPS, and read/write throughput is just an API service call away. If your environment is in need of more resources then add what you need to meet your demand and pay only for what you’ve used. If hardware fails, a configuration gets corrupted, or a database read replica falls too far behind simply rip and replace the bad components by tossing them and launch replacement capacity. Don’t be shy, leverage your extended “infinite” capacity to meet your needs and use it for only as long as you need it – then toss it.

Think parallel is number six on our list. Cloud deployments allow for choices not available in static infrastructure environments, so experiment with parallel architectures.  For example, instead running a job on machine for 4 hours, consider running it on 4 machines for 1 hour.  Moving serialized workflows to processing tasks in parallel can get complex functions done faster allowing you to focus your resources on other initiatives that help you gain a competitive advantage in the market. 

Finally, it is important to leverage as many storage options as necessary to meet your requirements. Use the right storage option for the job; remember that not one storage solution fits every need. Use a POSIX compliant network attached block storage for file systems, such as AWS Elastic Block Store (EBS). If you need to store web content consider using a durable object store like Simple Storage Service (S3). If you need persistent storage for an application, consider using a managed relational database like AWS Relational Database Service (RDS) or a high-throughput NoSQL database, such as DynamoDB. Use the flexibility afforded to you by the cloud; and leverage exactly the right storage option for the task at hand.

With Infrastructure-as-a-Service expected to achieve a compound annual growth rate of 41.3% by 2016, it is important to remember best practices and make each dollar spent be meaningful and beneficial for your organization. 

cta-engineers-customize

Our engineers customize
IT solutions for your business

The best hardware, software and cloud computing solutions are nothing without expert design and implementation.

Our team becomes your team. We take the time to understand your business needs first, and tailor high performance systems specifically for you.

Learn more
Live Chat Support Software