4 Azure Services to Improve Performance of Applications
Developing software solutions has evolved in the last years, and with the introduction of cloud technologies and services, the bunch of options available was exponentially increased.
It leads us to explore new options when designing the architecture of the software. With so many different services, sometimes it becomes difficult to choose a solution when creating a new application.
In this article, I want to share four solutions, how they can be used to improve the performance of an application, and why they should be considered in your next architecture.
Note, however, that several aspects of an application must be considered when defining the solution to achieve a desired level of performance.
Using one — or more combined — of the following services on a scenario is one of the factors to be considered when designing your solution.
Azure CDN
Azure Content Delivery Network is used to bring static content closer to the end-user.
Static files such as videos, images, and even static web sites with HTML, CSS, Javascript, and JSON files can use the advantages of Azure CDN.
The further the user is away from the website, the request must pass through more routers, switches, and network devices, making the latency higher to download the static files from where it is hosted.
It is a fact that the latency is measured in milliseconds, and changing the latency from one image from 30ms to 250ms might not seem much. But multiply that for ten or twenty images on the site, plus the HTML, CSS, and Javascript file.
It can lead from 0.6 seconds to 5 seconds. Add to that the CPU, disk, memory, and network resources from the webserver.
The CDN distributes the static content to the PoP — Point of Presence — which is closer to the user. User requests retrieve the files from the nearest PoP, not from the server.
It is interesting to note that there is more CDN PoP than Azure Data Centers, making your content get even closer to users.
As mentioned before, this solution can be applied to the whole static website or only for the static content of it. In both cases, it can be combined with Azure Blob Storage, where you can host the files, and create an Azure CDN endpoint to the blob storage.
Azure Front Door
Azure Front Door is a service that you put in front of your application to guide and route users, increasing reliability and availability.
It does precisely what its name says: It is a Front Door to your application, where you manage the global routing of traffic from your web application.
Azure Front Door works on HTTP/S layer 7, the application layer of the network. It offers URL based routing allowing to redirect to different backend pools based on the URL path.
The availability of backend pools is checked by health probes, which constantly monitors latency and samples to validate that the backend pool is responding.
In addition, it also includes DDOS protection and static content caching on the PoP — Point of Presence.
You can use Azure Front Door together with Azure CDN if you also have static content that must be consumed by your application. For instance, one of your backend pool can be pointing to an URL of Azure CDN, instead of an AppService.
Azure Traffic Manager
Azure Traffic Manager is used for routing traffic from users to applications that are most performance. It is a DNS traffic load balancer.
The service is similar to Azure Front Door, but while Azure Front Door operates on Application Layer 7, Azure Traffic Manager operates on Transport Layer 4 on the OSI model.
It means that you are not limited to HTTP/S and can be used to manage the traffic of other protocols. For instance, you can use the Azure Traffic Manager to manage and balance traffic with backend services using SignalR.
The traffic routing can be configured on six DNS based traffic routing:
- Priority
- Performance
- Geographic
- Weighted
- Subnet
- Multi-value
Azure Cache for Redis
Last but not least, Azure Cache for Redis is an in-memory cache to store data that can be quickly pulled out by the application.
It improves the reliability and performance of applications that rely on frequently accessed data. This data is cached and read from memory instead of need to read it from a database or disk, reducing the latency and increasing throughput when retrieving the information.
It can be used in the following scenarios:
- Cache Aside
- Content Cache
- User Session Cache
- Job and Message Queue
- Distributed Transactions
Among the features, we can highlight the capacity of data persistence, clustering, firewall security rules, and geo-replication
Conclusion
The services mentioned in this article can help bring content closer to end-user, as well as balancing the usage of backend resources.
Each service has its specific application scenario, as shown on the following table:
However, they are not exclusive and can be combined according to the architecture solution needed for your application.
For example, you can use Azure CDN for your static content, using this endpoint as a backend pool for an Azure Front Door.
Or using traffic manager to redirect users to a SignalR backend service that is most available at the moment. And this SignalR service can consume data from an Azure Redis Cache instance.
Just take into consideration the cost associated with each product and the real need for your application.
I also invite you to read the following article, where I give an overview of Azure Integration Services.
I hope you learned something new today. And as usual, don’t forget to follow, comment, react, and give your feedback!
Check other articles at: