Modernize your Applications with Cloud Design PatternsOctober 22, 2018
Many of the common design challenges for cloud applications have already been solved and documented as cloud “design patterns.” With these best practices in hand, you can develop your applications more quickly and efficiently, without having to recreate the wheel. Below, we share several patterns and anti-patterns that can help you build more reliable, scalable, and secure applications in the cloud.
Patterns to improve performance
Here are some of the patterns we find most useful. Each one talks about the problem the pattern solves, gives tips for applying the pattern, and gives an example for how you’d set it up.
- Retry: Enable an application to handle anticipated, temporary failures when it tries to connect to a service or network resource by transparently retrying an operation that’s previously failed
- Circuit breaker: Handle faults that might take a variable amount of time to fix when connecting to a remote service or resource
- Competing consumers: Enable multiple concurrent consumers to process messages received on the same messaging channel
- Priority queue: Prioritize requests sent to services so that requests with a higher priority are received and processed more quickly than those with a lower priority
- Queue-based load leveling: Use a queue that acts as a buffer between a task and a service that it invokes in order to smooth intermittent heavy loads
- Cache-aside: Load data on demand into a cache from a data store
- Throttling: Control the consumption of resources used by an instance of an application, an individual tenant, or an entire service
- Command and query responsibility segregation: Segregate operations that read data from operations that update data by using separate interfaces
You can see more cloud design patterns from Microsoft here.
Antipatterns that often degrade performance
And then there’s the flip side of things to watch out for. A performance antipattern is something that will likely cause scalability problems when your application is under pressure. Often, an application performs well during testing. But then when you release it into production, with many more users and larger workloads, it starts to perform poorly—rejecting user requests, stalling, or throwing exceptions.
Here are some examples of things that can cause these issues:
- Busy database: Offloading too much processing to a data store
- Busy front end: Moving resource-intensive tasks onto background threads
- Chatty I/O: Continually sending many small network requests
- Extraneous fetching: Retrieving more data than necessary
- Improper instantiation: Repeatedly creating and destroying objects that are designed to be shared and reused
- Monolithic persistence: Using the same data store for data with very different usage patterns
- No caching: Failing to cache data
- Synchronous I/O: Blocking the calling thread while I/O completes
Need help modernizing your applications to the cloud? We at Binary Tree are standing by to help with cloud architecture patterns—and much more. We’re exclusively focused on helping enterprises around the world plan, move, and manage their way to the Microsoft cloud. To get started, get in touch.
Source: Microsoft. Cloud Migration and Modernization Playbook. 2018.