Shadow / Production testing in production environment

There are multiples articles exists on What & Why around topic "TESTING IN PRODUCTION", whereas limited articles exists to cover the How part. In this article will cover details on How to perform the testing in production.

In this article, will cover the design, workflow & practices for application based on SOA principles, in case your application is monolithic then details implementation details will be covered in upcoming articles.

What is SOA?

A service-oriented architecture (SOA) is an architectural design pattern, in which application components provide services to other components via a communications protocol, typically over a network.
The principles of service-orientation are independent of any product, vendor or technology.
No alt text provided for this image

Most of the enterprise applications are build on top of in-house build framework, that helps in reducing the boilerplate code & to have centralized access on outbound & inbound connections.

In case your applications also build on top of some in-house build framework, then shadow / Production testing is not a big challenge to implement. Below picture demonstrate how production / shadow testing will be performed end to end.

No alt text provided for this image

You have to implement the following steps to get it working.

Step 1: Write a wrapper that can send request & receive response to & from another component, in addition to persisting the request & response in the memory (Redis)

Step 2: Write a wrapper to publish the Root request & response to Kakfa

Step 3: Write an application that will perform following operations

  • Kakfa Consumer : Consume the messages send using step 2, and replay the same on the application
  • Mocked Responses: In this environment, application will talk to Shadow Service, instead of talking to real service, and this shadow service will look into the memory to return the response.
  • Payloads comparison: Once root response in available in new environment, then compare the original root response with the newly generated response
  • Kafka Publisher: Publish the required details to the Kakfa, such that analysis can be done on real time.

The above mentioned steps are bare minimal, which are required to get the shadow / production testing to work. But there are few factors those needs to be considered before rolling out the changes to production, like controlling the traffic for which production / shadow testing is required, as this design consumes the memory to persist the request & response Payloads.

要查看或添加评论,请登录

Nitin Gupta的更多文章

  • From Corporate Comfort to Startup Chaos: A Founder's Tale

    From Corporate Comfort to Startup Chaos: A Founder's Tale

    Transitioning from a stable MNC employee role to a startup founder presents numerous challenges across various aspects…

    1 条评论
  • Minimize income tax this year.

    Minimize income tax this year.

    Strategize investments to have zero income tax liability for individuals earning up to 10.5 lac per annum.

  • Operational excellence

    Operational excellence

    Operational excellence is not just saving money but enabling growth is critical. Operational excellence has the…

  • Creating Nominee claim assistant system

    Creating Nominee claim assistant system

    Problem Statement: An individual#1 performs investments in multiple financial assets* across the years. None of the…

  • How to manage Financial Portfolio

    How to manage Financial Portfolio

    In this article will cover following points, and trust me it will help you to better manage your portfolio What is…

社区洞察

其他会员也浏览了