Design for performance

With the availability of fast internet, customers are seeking high-performant applications with minimal load time. Organizations have noticed that a direct revenue impact is proportional to application performance, and slowness in application load time can significantly impact customer engagement. Modern-era companies are setting a high expectation when it comes to performance, which results in high-performant applications becoming a necessity in order to stay in the market. 

Like resiliency, the solution architect needs to consider performance at every layer of architecture design. The team needs to put monitoring in place to continue to perform effectively, and work to improve upon it continuously. Better performance means more user engagements and increases in return on investment—high-performance applications are designed to handle application slowness due to external factors such as a slow internet connection. For example, you may have designed your blog web page to load within 500 milliseconds where there is good internet availability. However, in cases of a slow internet, you can load text and engage the user while images and videos are still loading.

In an ideal environment, as your application workload increases, automated scaling mechanisms start handling additional requests without impacting upon application performance. But in the real world, your application latency goes down for duration when scaling takes effect. In a real-world situation, it's better to test your application for performance by increasing the load and understand if you can achieve the desired concurrency and user experience.

At the server level, you need to choose the right kind of server depending upon your workload. For example, choose the right amount of memory and compute to handle the workload, as memory congestion can slow down application performance, and eventually, the server may crash. For storage, it is important to choose the right input/output operations per second (IOPS). For write-intensive applications, you need high IOPS to reduce latency and to increase disk write speed.

To achieve great performance, apply caching at every layer of your architecture design. Caching makes your data locally available to the users or keeps data in-memory in order to serve an ultra-fast response. The following are the considerations that are required to add caching to various layers of your application design:

  • Use browser cache on the user's system to load frequently requested web pages.
  • Use the DNS cache for quick website lookup.
  • Use the CDN cache for high-resolution images and videos that are near to the user's location.
  • At the server level, maximize the memory cache to serve user requests.
  • Use cache engines such as Redis and Memcached to serve frequent queries from the caching engine.
  • Use the database cache to serve frequent queries from memory.
  • Take care of cache expiration and cache eviction at every layer.

As you can see, keeping your application performant is one of the essential design aspects and is directly related to organization profitability. The solution architect needs to think about performance when creating solution design and should work relentlessly to keep improving the performance of the application.

You will learn more about different caching patterns in Chapter 6, Solution Architecture Design Patterns. Performance is a critical factor, and in Chapter 7, Performance Considerations, you will dive deep further to learn techniques to optimize your application for better performance.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.227.102.124