Monday, December 23, 2024

Unity Ads Performs 10M Tasks Per Second With Memorystore

- Advertisement -

Memorystore powers up to 10 million operations per second in Unity Ads.

Unity Ads

Prior to using its own self-managed Redis infrastructure, Unity Ads, a mobile advertising company, was looking for a solution that would lower maintenance costs and scale better for a range of use cases. Memorystore for Redis Cluster, a fully managed service built for high-performance workloads, is where Unity moved their workloads. Currently, a single instance of their infrastructure can process up to 10 million Redis operations per second.The business now has a more dependable and expandable infrastructure, lower expenses, and more time to devote to high-value endeavors.

- Advertisement -

Managing one million actions per second is an impressive accomplishment for many consumers, but it’s just routine at Unity Ads. Unity’s mobile performance ads solution readily manages this daily volume of activities, which feeds ads to a wide network of mobile apps and games, showcasing the reliable capabilities of Redis clusters. Extremely high performance needs result from the numerous database operations required for real-time ad requests, bidding, and ad selection, as well as for updating session data and monitoring performance indicators.

Google Cloud knows that this extraordinary demand necessitates a highly scalable and resilient infrastructure. Here comes Memorystore for Redis Cluster, which is made to manage the taxing demands of sectors where speed and scale are essential, such as gaming, banking, and advertising. This fully managed solution combines heavier workloads into a single, high-performance cluster, providing noticeably higher throughput and data capacity while preserving microsecond latencies.

Providing Memorystore for Redis Cluster with success

Unity faced several issues with their prior Do-It-Yourself (DIY) setup before utilizing Memorystore. For starters, they employed several types of self-managed Redis clusters, from Kubernetes operators to static clusters based on Terraform modules. These took a lot of work to scale and maintain, and they demand specific understanding. They frequently overprovisioned these do-it-yourself clusters primarily to minimize possible downtime. However, in the high-performance ad industry, where every microsecond and fraction of a penny matters, this expense and the time required to manage this infrastructure are unsustainable.

Memorystore presented a convincing Unity Ads solution. Making the switch was easy because it blended in perfectly with their current configuration. Without the managerial overhead, it was just as expensive as their do-it-yourself solution. Since they were already Google Cloud users, they also thought it would be beneficial to further integrate with the platform.

- Advertisement -

The most crucial characteristic is scalability. The ability of Memorystore for Redis Cluster to scale with no downtime is one of its best qualities. With just a click or command, customers may expand their clusters to handle terabytes of keyspace, allowing them to easily adjust to changing demands. Additionally, Memorystore has clever features that improve use and dependability. The service manages replica nodes, putting them in zones other than their primary ones to guard against outages, and automatically distributes nodes among zones for high availability. What would otherwise be a difficult manual procedure is made simpler by this automated method.

All of this made Unity Ads decide to relocate their use cases, which included state management, distributed locks, central valuation cache, and session data. The relocation process proceeded more easily than expected. By using double-writing during the shift, they were able to successfully complete their most important session data migration, which handled up to 1 million Redis operations per second. Their valuation cache migration, which served up to half a million requests per second (equivalent to over 1 million Redis operations per second) with little impact on service, was even more astounding. It took only 15 minutes to complete. In order to prevent processing the same event twice, the Google team also successfully migrated Unity’s distributed locks system to Memorystore.

Memorystore in operation: the version of Unity Ads

Google Cloud has a life-changing experience using Memorystore for Redis Cluster. Its infrastructure’s greater stability was one of the most obvious advantages it observed. Because its prior DIY Redis cluster was operating on various tiers of virtualization services, such as Kubernetes and cloud computing, where it lacked direct observability and control, it frequently ran into erratic performance issues that were challenging to identify.

Consider this CPU utilization graph of specific nodes from its previous self-managed arrangement, for example:

Redis cluster node CPU Usages
Image credit to Google Cloud

As you can see, the CPU consumption across many nodes fluctuated a lot and spiked frequently. It was challenging to sustain steady performance in these circumstances, particularly during times of high traffic.

During Kubernetes nodepool upgrades, which are frequently the result of automatic upgrades to a new version of Kubernetes, it also encountered issues with its do-it-yourself Redis clusters. The p99 latency is skyrocketing, as you can see!

Redis client 99th percentile latencies during a kubernetes nodepool upgrade
Image credit to Google Cloud

Another big benefit is that we can now grow production seamlessly because of Memorystore. This graph displays its client metrics as it increased the cluster’s size by 60%.

With very little variations, the operation rate was impressively constant throughout the procedure. For us, this degree of seamless scaling changed everything since it made it possible to adjust to shifting needs without compromising our offerings.

The tremendous performance and steady low latency it has been able to attain using Memorystore are described in the data presented above. For its ad-serving platform, where every microsecond matters, this performance level is essential.

Making a profit from innovation

Unity ads switch to Memorystore has resulted in notable operational enhancements in addition to performance gains. It no longer invests effort in preparing its Redis clusters for production by testing and fine-tuning them.

Business-wise, it anticipates that by properly scaling clusters and applying the relevant Committed Use Discounts, it should be able to get cost savings on par with its prior do-it-yourself solution, particularly with the addition of single zone clusters to cut down on networking expenses. For a comparable price to prior self-managed Redis deployment, it is now able to obtain a fully managed, scalable, and far more dependable (99.99% SLA) solution with Memorystore.

With an eye toward the future, Memorystore has created new opportunities for system architecture. For many of the use cases, it is currently thinking about taking a “Memorystore-first” strategy. For instance, engineers frequently choose persistent database solutions like Bigtable when creating crucial data systems because they don’t want to take chances, even whether the use case actually requires persistence and/or consistency.

Databases like Bigtable are better suited for data that will persist for months to years, but occasionally the use case just requires data durability for about an hour. It may save money and development time by avoiding such shortcuts and optimizing for its shorter persistent (such as hours-to-day) data use cases with a hardened, dependable Redis Cluster solution like Memorystore. Overall, it can confidently extend the use of Redis across more infrastructure to reduce costs and boost performance because of Memorystore’s scalability and dependability.

The ease with which persistence (AOF or RDB) can be enabled on Memorystore is another revolutionary advantage. Its use cases were restricted to caching scenarios with transitory data that it could afford to lose because its Kubernetes DIY Redis cluster did not allow permanence. It can expand use cases and even mix use cases within the same cluster with Memorystore’s one-click persistence, which boosts usage and reduces expenses.

Every second matters in business. Memorystore is helping them remain competitive and provide its publishers and advertisers with better outcomes by allowing the team to concentrate on core business innovation instead of infrastructure administration.

- Advertisement -
Thota nithya
Thota nithya
Thota Nithya has been writing Cloud Computing articles for govindhtech from APR 2023. She was a science graduate. She was an enthusiast of cloud computing.
RELATED ARTICLES

Recent Posts

Popular Post

Govindhtech.com Would you like to receive notifications on latest updates? No Yes