Best Practices for Performance Efficiency in the Cloud
Best practices in the design, delivery, and maintenance of cloud environments
To quickly sum up performance efficiency, we can say that it is the efficient use of cloud computing resources to meet requirements, and how to maintain efficiency as demand changes and technologies involve. Conceptually everything applies in the same fashion across cloud providers. However here I reference AWS, as that is what I primarily work with and I believe they have the most concise documentation.
It sounds a little complicated but it doesn’t have to be, we can break it down into five simple principles:
- Democratize advanced technologies
2. Go global in minutes
3. Use serverless architectures
4. Experiment more often
5. Consider mechanical sympathy
With these principles in mind, there are only 3 action items that you then need to take to move closer to peak efficiency. Select, Review, Monitor. As always the more you can automate, the easier your life becomes, so always keep that in mind as you are building out architecture.
Ultimately what you want to do is make the best selections for all areas of your resources. These include compute, database, storage, and networking layers.
In the cloud, there are a few common principles you can adopt to fall in line with the principles and steps listed above:
- Understand the available services and resources
- Define a process for architectural choices
- Factor cost requirements into decisions
- Use policies or reference architectures
- Use guidance from your cloud provider or an appropriate partner
- Benchmark existing workloads
- Load test your workload
It might seem a little overwhelming, however since there are so many potential use cases and combinations of services and resources you can have, this may be the most complicated of the 5 pillars of cloud architecture.
- Understand the available services and resources
More than likely, your complete architecture is going to use multiple solutions and enable different features to improve performance. Since AWS offers over 200 services, it is important for you to take a 10,000 foot view and pick out the handful you need for your business.
Even if you wanted to go with a hybrid approach and keep some resources on premise, you could still for example use cloud based storage in a portion of your business to take advantage of the scalability and cost saving methods.
To know what best would suit you and help develop an efficient system, you should take inventory of your workload software and architecture. Identify which workload components could be replaced with a managed service to increase performance and reduce operational complexity.
2. Define a process for architectural choices
You should either use internal experience, or reference published use cases or whitepapers, to define a process to choose resources and services. Define a process that encourages experimentation (within reason), and benchmark the services that could be used in your workload. Be sure to identify constraints such as legacy requirements or integrations, and identify opportunities for reuse.
Be sure to define your performance requirements, largely coming from customer experience. Use metrics to define your customer experience and subsequently, document the customer experience. Script your user stories to help you document the experience and gain visibility into it.
3. Factor cost requirements into decisions
It is inevitable that whatever business you work for or are running, there are going to be budgets on what can be spent and where. By understanding the different tiers and pricing of the services you are considering, you can make the best decisions to fall in line with cost optimization principles as well.
Make sure you note what ways you can scale a service up or down, so you can automate saving money and/or continuing to meet performance requirements.
4. Use policies or reference architecture
They say the best artists steal, so you should reference existing architectures when selecting services and configurations. It is also wise to draw from internal policies and experience, the people who know your business best likely work there.
By having policies as well you can follow a defined process to save time on making future decisions for services and resources.
5. Use guidance from your cloud provider or an appropriate partner
When designing architecture or expanding it, why not consult with an expert? Sure it may cost you money, but it could also make substantially more than that cost for you in the long run.
On top of AWS support tiers, you can consult certified Solutions Architects and AWS Professional Services. At a minimum you can utilize developer level support while you are testing and experimenting with AWS, but as your business starts to grow and become more complex you should consider more guidance. This could save you lots of time worrying about the cloud and give you more time to focus on running your business.
6. Benchmark existing workloads
Benchmark the performance of an existing workload to understand how it performs in the cloud. Use the data collected from benchmarks to drive architectural decisions. Benchmarking in this context refers to an evaluation of a metric or metrics by running a program.
Benchmarking is generally quicker to setup than load testing, and is used to evaluate the technology for a particular component. If you want an example of an industry standard benchmark test you can find it here. Benchmarks allow you to compare environments more effectively.
The keys here are to monitor performance during development, integrate into your delivery pipeline, test user journeys, and have real-user monitoring. Following this guidance allows you to establish more concise benchmark tests.
7. Load test your workloads
Load testing involves your actual workload so that you can see how your solution performs in a production environment. Your load tests should use data that is scrubbed of any PII data, and do your best to automate load tests as part of your delivery pipeline. Then, compare your results against your KPI’s.
You can also load test a proof of concept, production-scale environment in the cloud that you will only pay for when you need it. This saves you a ton of costs by not needing multiple production environments on site for testing. There are also multiple managed services such as CloudWatch and CloudTrail that be used in conjunction to get as detailed as you want with your testing.
If you follow the above 7 principles, you will have a pretty good chance at adopting a very efficient system with respect to your compute, database, storage, and networking resources.
Hopefully this gives you a better idea of what to keep in mind when designing for performance efficiency in the cloud. To take a deep dive, consult the AWS white paper on Performance efficiency.
As always, best of luck on your continued journey through cloud computing.