Zero Stress, Full Control: Sanity Testing with Rush Environment

To reach our goal of 99.99% availability, we implemented various strategies, focusing on improving production stability as a key measure.This blog post will delve into the initiatives we undertook to improve the production sanity environment.

Major challenges commonly faced in creating an effective environment for production sanity include:

A. The rapid pace of development cycles among teams often leads to inconsistencies in the environment designated for production stability checks.

B. The absence of an environment that mirrors the production setup, both in structure and volume, mainly due to the high costs associated with maintaining replicas that are synchronised with the actual production environment.

In response to these issues, we initiated a series of brainstorming sessions to clearly define the problem and develop effective solutions.

What are we trying to solve?

Inter Service Dependencies

With hundreds of services undergoing continuous development, it becomes challenging to conduct production sanity checks in isolation.

Dependency Diagram of one of our service

Data sanity

Maintaining In-Sync Replicas to ensure data is synchronised with the production environment for staging can incur significant costs.

Environment sanity

When each service team tests their features concurrently on the staging environment, it can present significant challenges in preserving the integrity of the codebase.

Limited time for production sanity

When the staging environment fails to accurately replicate the production environment, production sanity checks must be conducted directly in the production setting. This constraint imposes strict time limitations for testing and necessitates conducting User Acceptance Testing (UAT) during off-peak hours.

Enter Rush_Env !

Considering above challenges we need  to come up with  an environment which mirrors production in data and code, easy to maintain in line with production, and short-lived.

Request Routing in Production with Rush_Env

The architecture of our system was based on  following goals :

  1. User-Specific Routing: Routing traffic for a set of users on specific services .
  2. Service Instance Multiplicity: Different instances of service can be spawned simultaneously to test different features in isolation.
  3. Flexible Request Routing: Route user requests to  instances of services in different environment based on headers present in incoming request.
  4. Production Data Testing: Using the same data stores as production.
  5. Regression Testing Environment: Creating environment which gives a platform to perform regression as well as UAT for any amount of time.
  6. Independent Monitoring and Alerting: Separate monitoring and alerting framework to facilitate distributed tracing and monitoring.

By focusing on these design goals, we aim to create a more resilient, flexible, and user-centric system.

Request Routing

Implementing user-specific routing to direct certain users to our Rush Environment (Rush_Env)  in AWS EC2 involves following components:

Prod Sanity Flow for a request in Rush_Env

User Whitelisting for Rush_Environment

For prod sanity and in order to allow user specific traffic to be routed to Rush_Env we need to perform following steps:

For e.g. if User U1 needs to be tested for services(M1, M2) for production sanity. QA will whitelist the user for these set of services in config compass.

Deployment Procedure

Here's how the deployment process with Rush Environment unfolds:

A) Destroys the infrastructure set up for the specific Rush Environment being tested.

B) Deletes the target group associated with the tested service.

C) Removes the custom routing rule from the load balancer to ensure it doesn't affect subsequent production traffic or incur unnecessary evaluation overhead.

Production Sanity Life Cycle

Distributed tracing, Monitoring and Alerting

For our Rush_Env, we wanted to have more aggressive  monitoring and alerting capabilities. To achieve this we created a library which takes care of :

Distributed Tracing via Promethues,Tempo,Grafana

Rush_Env in Kafka:

Post solving for web throughput our next goal is to achieve similar functionality in non web especially Kafka.

Objectives

Testing Scenarios

The testing for Kafka within the Rush_Env will cover various combinations of producers and consumers to ensure comprehensive coverage:

1. New producer + New consumer

2. Old producer + New consumer

3. Old producer + Old consumer

4. New producer + Old consumer

Proposed Solution

Current Limitations

Changes we planning to make

Producer Library

Consumer Library

Message Production and Consumption for Production Sanity

Operational Flow

This dual-library approach with intelligent event routing based on tenancy and environment context ensures that our Kafka-based messaging system can support dynamic, environment-specific testing without interfering with production operations. It facilitates a robust testing framework that allows for comprehensive validation of new features and changes in an isolated yet realistic environment.

Stay tuned as we continue to innovate and share our journey, hoping to inspire and contribute to the broader tech community. Our adventure into optimising Kafka for our Rush Environment is just one of many steps we're taking towards building more resilient, efficient, and user-centric software solutions.

Disqus Comments

We were unable to load Disqus. If you are a moderator please see our troubleshooting guide.

G

Start the discussion…

Comment

Log in with
or sign up with Disqus or pick a name

Disqus is a discussion network

Read full terms and conditions

This comment platform is hosted by Disqus, Inc. I authorize Disqus and its affiliates to:

Acknowledge I am 18 or older

Favoriting means this is a discussion worth sharing. It gets shared to your followers' Disqus feeds, and gives the creator kudos!

Find More Discussions

Share

Be the first to comment.

Load more comments

live.rezync.com

live.rezync.com is blocked

This page has been blocked by an extension

ERR_BLOCKED_BY_CLIENT

Reload

This page has been blocked by an extension

pippio.com

pippio.com is blocked

This page has been blocked by an extension

ERR_BLOCKED_BY_CLIENT

Reload

This page has been blocked by an extension