How to Speed Up Your Application in Azure

Hello, I would like to explain the options that help you in speeding up your application in Azure.

Generally, applications face performance issues. These performance issues arise because of many reasons. Some of these reasons are listed below:

  • Bad coding practices/Unmanaged code
    • Yes, if an application is developed with bad coding practices such as objects that are not properly disposed or unnecessary iterations etc…, then performance issues will arise. This is taken care by developers only, there are no other options for this.
  • Dealing with database
    • While dealing with DB, developers should be very careful on querying data.
    • Developers should concentrate on indexing of data and filtering while querying. If proper filters are not used, then the query gives unnecessary results which result in performance issues.
    • Maintain data in proper format. Data can be maintained in different formats like Relational data, Key value pair data and non-relational data. Based on applications requirements, we can choose the better approach.
  • Deployment location / Application availability
    • Yes, this one also reduces the application’s performance. If an application is deployed in one location and it’s end users in other locations, then it will also cause performance issues due to latency.

Now, we will investigate the options available in Azure which help speed up an application. Azure has the following options to increase performance of applications:

  • Azure CDN
  • Redis Cache
  • Traffic Manager

Azure CDN: Content Delivery Network

A content delivery network (CDN) is a distributed network of servers that can efficiently deliver web content to users. CDNs store cached content on edge servers in point-of-presence (POP) locations that are close to end users, to minimize latency.”

Azure has multiple geographical locations in all the countries. If we deploy an application in an East Asian location, then the application contains static data (not changed frequently) like assets (script, styles, images, videos etc..).

If a user accesses the application from a deployed location (East Asia), then, it’s performance is good because of less latency. But, if any user accesses this application for other locations like US, then performance is low because of high latency.

For each request, the required static data loads from the application at its deployed location. Due to this, latency will be increased. If we load the application’s static data from the user’s nearest location edge server, then the application performance will be good. To achieve this, we can use Azure CDN.

Azure CDN have multiple POP (point of presence). We can choose required POP based on the application’s end user’s locations. For example, if we choose US as a POP, then all the static data is cached in an edge server at this location(POP), when the user accessed application first time. From the next time onwards, static data will be loaded from this POP edge server. Due to this, we can increase the loading speed of an application in Azure.

Azure CDN have some limitations based on selected tires. For more details, refer MS site.

Redis Cache:

It is typically used as a cache to improve the performance and scalability of systems that rely heavily on backend data-stores. Performance is improved by temporarily copying frequently accessed data to fast storage located close to the application.

With Redis cache, this fast storage is located in-memory with Redis Cache instead of being loaded from disk by a database.

Azure Redis Cache gives you access to a secure, dedicated Redis cache, managed by Microsoft, hosted within Azure, and accessible to any application within or outside of Azure.

There are many common patterns where Redis Cache is used to support application architecture or to improve application performance. Some of the most common include:

  • Cache-aside
  • Content-Caching
  • User session caching

Azure Redis Cache have some limitations based on pricing tires. For more details, refer MS site.

Azure Traffic Manager:

Traffic Manager allows you to control the distribution of user traffic for service endpoints in different data centers. Service endpoints supported by Traffic Manager include Azure VMs, Web Apps, and Cloud services. You can also use Traffic Manager with external, non-Azure endpoints.

Traffic Manager uses the Domain Name System (DNS) to direct client requests to the most appropriate endpoint based on a traffic-routing method and the health of the endpoints. Traffic Manager can recover quickly from failure, including the failure of an entire Azure region.

Traffic Manager Benefits:

  • Improve availability of critical applications: Traffic Manager delivers high availability for your applications by monitoring your endpoints and providing automatic failover when an endpoint goes down.
  • Improve responsiveness for high-performance applications: Azure allows you to run Cloud services or websites in data centers located around the world. Traffic Manager improves application responsiveness by directing traffic to the endpoint with the lowest network latency for the client.
  • Perform service maintenance without downtime: You can perform planned maintenance operations on your applications without downtime. Traffic Manager directs traffic to alternative endpoints while maintenance is in progress.
  • Combine On-premise and Cloud-based applications: Traffic Manager supports external, non-Azure endpoints enabling it to be used with hybrid cloud and On-premise deployments, including the “burst-to-cloud,” “migrate-to-cloud,” and “failover-to-cloud” scenarios.
  • Distribute traffic for large, complex deployments: Using nested Traffic Manager profiles, traffic-routing methods can be combined to create sophisticated and flexible rules to support the needs of larger, more complex deployments.

For more details regarding Traffic Manger refer MS Site

Now, choose one among these three services to speed up an application in Azure based on following:

CDN

Redis Cache

Traffic Manager

Offload traffic from your application

Yes

Bring data closer to users

Yes

Yes

Bring application closer to users

Yes

Provide fast in-memory access to data

Yes

 

I hope this information is helpful to you. Thanks for reading, will catch you with another concept.

Related posts