Thursday, October 5, 2023

Architecture: Its Aid in Performance Engineering -- Part 2

 

I hope, you and I have the common shared understanding for the word "architecture".  If not read this blog post and come here to know about the dots.


Do I Know the Dots?

Before connecting the dots, I should know,

  • What are the dots and how to identify them, where and when? 
  • Who can help me in doing so?

In Software Security & Engineering, we use a Threat Model to,
  • Identify the risks, surface area, tests and to develop the payloads. 
  • A software system's architecture will help in developing and improvising the Threat Model consistently.

I see, the same for software system's Performance Engineering & Testing.  To test better for the performance,
  • I need to identify the dots, risks, surface area, tests, payloads, monitoring aid and correlation of all these.
  • The understanding of software system's Architecture is a necessity to do so.
    • But, what are the dots here?

The dots can be identified when I know how to use the Testability provided by the architecture.  This leads me to evaluate the performance for the boundaries and interfaces in isolation and as a whole, and then correlate.


With this, it puts me to question - What is the performance of this architecture?
  • I did not say the performance of software system; I said, the architecture.  
  • There should be some characteristics to identify and evaluate the performance engineering models offered by the architecture. 
    • What are they?  

The architecture's characteristics helps,
  • To identify and distinguish the dots in ease and to test better.
    • How can I test for the performance aspects of a software system using the architecture's characteristics?
    • How do I identify these characteristics in the architecture of software system?



The Characteristics of an Architecture


Last year I read an article from ByteByteGo System Alliance.  This article flashed in my mind as I read the question,
How important is the understanding of application architecture to do performance testing better?
This is one of the article which I refer to identify the performance characteristics of the architecture.  I refer to the cheatsheet shared in this article for my references.

In few projects and organizations that I have worked, most of these characteristics were put into practice and production environment.  I monitored them in usual traffic and unexpected traffic.  The feel is something that I cannot describe in words; I want to experience it.



Performance Engineering Aided by Architecture


Which characteristics of architecture is associated to the which boundaries and interfaces of a software system?  Knowing this, helps you and me in thinking - What has to be tested in performance for this interface in this boundary?

I want to share my work experience here.  But, I see, if I share something which we all can relate to, it will be of help in knowing - Why it is important to know about the architecture to do the performance testing?

Below one is a recent use cases from software industry for the same.
  • I will not explain in detail; but, I will bring the key points to the context of this blog post


Amazon Prime's Audio-Video Monitoring Service Moving to Monolith Architecture

What I and You Should Know:
  • The complete Amazon Prime system did not move to Monolith.
    • The Prime Video's Audio-Video Monitoring Service moved to Monolith.
      • Why?
        • This monitoring system which was orchestrated with a Microservice architecture did not scale after a limit
        • Problem Statement:
          • Say, the Prime Audio Video Monitoring Service expected a load of active 100 concurrent users streaming movie Kantara in Kannada audio.
          • After the 6th user started streaming the same video [in the same audio or different audio language], this monitoring system did not scale to include other 95% of concurrent user. 
          • As a result, the Prime Audio Video Monitoring Service slows down [or stops,] and eventually the video streaming to the active concurrent users will take a hit. 
          • This monitoring service is important so that each user gets a video and audio of the agreed upon quality and streaming.
What I understand is,
  • This monitoring service was continued in production while the team looked for better solution in performance with the given architecture.
  • While it did so, the cost of having this architecture was high when it had to scale up.
  • Looks like Prime Video business beared this cost for sometime is what I see.
But, the online streaming business cannot settle and agree to pay high cost, while it is planning to stream the live sports action in coming days.  A need came to look into performance characteristics in the being used monitoring service's architecture.

It eventually re-orchestrated the existing components with a new architecture in place.
  • It moved from the distributed microservice system to a monolith system, where the spawning of Amazon Step Function (error detector clusters) happened vertically.
  • Along with this, the architecture of this monitoring service was placed in a way, such that, most of its components came into one process.
  • Thus, eliminating the S3 bucket as immediate storage for video frames (as images) and audio files.
  • This architecture helped the creational, behavioral, structural and functional characteristics of Prime Video's Audio-Video Monitoring service.

Prime Video says upon testing for performance and changing to monolith by rearranging the existing components,
  • It saved 90% of the cost.
  • 90% of cost for Amazon, is what in the numbers if it is in Indian Rupees? 
  • How much a tester gets paid if just 1.5% of this 90% is paid as a salary per month?
    • I will leave this to your thoughts and calculation.

If I know the architecture and where to look for what characteristics, it helps me to think of right performance tests for the context.  

The Hostar's emoji introduction in live cricket matches during 2018 and its consistent improvisation in processing for performance is a good use case, to the question -- Why it is important to know about the architecture to do the performance testing?




To conclude, architecture cannot be ignored in Testing.  It plays a critical role for aiding and identifying the testability and BCFS (behavior, creational, functional and structural) characteristics of a software system.


No comments:

Post a Comment

Please, do write your comment on the read information. Thank you.