Skip to content

Add caching layer to reduce MongoDB call volume in request handling #1631

Open
@Apoorva64

Description

@Apoorva64

Reason/Context

  • Using microcks to mock partner microservices during perf testing
flowchart LR
    K6[k6 Load Test]
    MS[Microservice Under Test]

    subgraph Microcks [Microcks]
        P1[Partner A - Mock]
        P2[Partner B - Mock]
        P3[Partner C - Mock]
    end

    K6 -->|HTTP Request| MS
    MS -->|Calls| P1
    MS -->|Calls| P2
    MS -->|Calls| P3

Loading

Description

Microcks currently makes direct MongoDB queries for each incoming mock request — even when handling repeated or identical requests. This results in increased latency and higher DB load, especially under heavy usage.

Implementation ideas

Introducing a caching layer (e.g. in-memory/Redis) could significantly reduce repetitive DB operations and improve performance.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions