Skip to content

Draft: Msrivastava/resiliency extension legal

Muskan Srivastava requested to merge msrivastava/resiliency-extension-legal into master

All Submissions:

  • I have added an explanation of what changes in this merge do and why we should include it? - YES
  • Does the MR contain pipeline/ helm chart related changes?- NO
  • I have updated the documentation accordingly. - NO
  • I have added tests to cover my changes. -NA
  • All new and existing tests passed. -YES
  • My code follows the code style of this project. -YES
  • I ran lint checks locally prior to submission. -YES

What is the issue or story related to the change?

This change is a step forward to enable the services to configure following variables for service-to-service communication:

  • Circuit Breaker
  • Retry count for service unavailable strategy
  • Connect timeout
  • Connection Request Timeout
  • Socket Timeout

All the above features are handled by HttpClientAzure class. This MR essentially enables use of HttpClientAzure for legal service. These configurations can be used for legal service now.

High level design: This MR adds 2 classes in total.

  • LegalAPIConfigAzure : creates a bean of type LegalAPIConfig
  • LegalFactoryAzure : uses newly created HttpClientAzure internally so that configurable retires, CB and timeouts can be used for Legal Service.

Does this introduce a breaking change?

  • NO

Tests and Results

To test the CB and timeouts, I used the scenario where storage service calls legal service. Simulations were triggered by Firefly Flight

  1. Circuit Breaker: To test this legal service was killed. Result is as followsScreenshot__29_

  2. Timeouts: To test this Socket Timeouts was configured to be 40 sec for any calls made to legal service. Latency was induced to legal service between the range of 45 sec and 50 sec. Screenshot__30_

Edited by Muskan Srivastava

Merge request reports