HOW WE BOOSTED CHECKOUT SLUGGISHNESS USING AWS ELASTICACHE

Here at Mumo Systems, we take user experience very seriously. Our app's speed and performance are fundamental to that experience, and any lag can compromise it significantly. Recently, we found ourselves facing a challenge: Checkout in the Atlassian cloud started to lag, especially when retrieving thousands of assets for most requests sent to it. We'd like to share with you our journey, the problem, and how we utilized AWS ElastiCache with Redis to overcome this hurdle.

The Thorny Issue: A Performance Lag

Our application was designed to communicate with Atlassian's asset API, frequently fetching a large number of assets. The situation was complicated by the fact that Atlassian's API lacked query capabilities and pagination, necessitating a full retrieval of all data which took a long time for large asset sets.

Our initial solution was to implement in-memory caching, a method that stored data temporarily in the app's 'memory' for quicker access. This caching strategy allowed the assets to remain available for five minutes before they expired and were fetched anew from Atlassian's API.

While this solution worked initially, we found that the increasing volume of data caused substantial lags for each customer every five minutes after the cache expired. Consequently, the performance issues became more problematic, with the need for frequent data fetching as well as Atlassian throttling our data fetches leading to inefficient operations.

Searching for Solutions: Introduction to AWS ElastiCache

To combat these issues, we turned to Amazon Web Services (AWS) and discovered the potential of AWS ElastiCache. ElastiCache is a web service that simplifies deploying, operating, and scaling an in-memory cache in the cloud. It can be used to significantly improve latency and throughput for many read-heavy application workloads (or computer-heavy workloads) by caching the most frequently accessed data.

One of the key features that made ElastiCache an attractive solution was its support for Redis, an open-source, in-memory data structure store that can be used as a database, cache, message broker, and more. Redis is known for its high performance, flexibility, and rich set of data types.

A Winning Combination: ElastiCache with Redis

We chose to use AWS ElastiCache with a Redis engine. Redis offered us an array of capabilities, including support for complex data structures and the ability to handle numerous concurrent read/write operations with minimal latency. Importantly, Redis also offered JSON indexing features, which further enhanced the speed of operations.

We configured our application to cache assets in ElastiCache with Redis for 15 minutes, three times the duration of our previous in-memory caching strategy. On cache expiry, we automated the process to refresh the cache. This was part was huge since now the customer did not have to face the refresh themselves every five minutes. Furthermore, when a user edits an asset, we ensured the cache would update accordingly to maintain data consistency.

Reveling in Results: Improved Performance and User Experience

The results were almost immediate and astonishing. With the adoption of AWS ElastiCache and Redis, we observed an impressive improvement in our application's performance. The time taken to fetch assets dropped significantly. For example, requests that were taking up to 45 seconds previously without caching, now typically returned in less than 500 milliseconds, representing a almost one hundred-fold increase in speed.

Our server became less overwhelmed with frequent fetch requests, thanks to the extended cache expiration time, out sourcing caching to Redis and automated refresh. The JSON indexing features provided by Redis will further enhance our Checkout’s ability to quickly retrieve the necessary assets, particularly when custom complex queries are involved.

The user experience improved significantly. Users reported that the app felt snappier and more responsive, and the instances of lag that once plagued our app were a thing of the past. All of this was achieved without needing to alter our primary datastore or significantly re-architect Checkout.

Conclusion: Embracing AWS ElastiCache and Redis

Our journey has shown us the value of selecting the right tools for the right job as well us overcoming challenges in situations where you have no control. In our case, combining AWS ElastiCache with Redis enabled us to optimize our Checkout's performance significantly where we could not change Atlassian API, leading to an enhanced user experience.

Recent posts