Hello WireMock Team, I am part of a project team ...
# help
Hello WireMock Team, I am part of a project team currently involved in migrating a microservice from Node.js to Java. A key objective of our project is to ensure complete parity in API requests and responses, as we have external clients interfacing with our system. To achieve this, we have devised a specific setup for recording both the Node.js application’s requests/responses and the requests/responses from the external API the application uses. These recordings are intended to be replayed against our new Java implementation for a comprehensive comparison of responses. Attached below is a diagram illustrating our setup. Notably, the WireMock instance, deployed as a sidecar in the same Kubernetes pod as our Node.js application, is central to this strategy. We plan to deploy this configuration in a production environment to capture a full day’s worth of traffic. Our current load is approximately 60,000 calls per day. Given that we have not previously utilized WireMock proxy under such production traffic conditions, we are reaching out to gather insights and opinions on whether WireMock can reliably handle this volume of traffic. Any advice, suggestions, or considerations you could provide would be invaluable to us.
Hello. It is hard to say much without knowing what the requests actually constitute in terms of size and processing complexity. 60,000 per day doesn't seem much, and I would assume WireMock can handle if given enough resources. That said, I need to mention that WireMock is a developer tool which is neither designed nor tested for use as a long-term deployment in production environments. When you use it in such a way, you will be likely responsible to monitor its memory usage, extract the data via REST API / storage extension, and then clear the caches and accumulated logs. For that there are admin API endpoints too
Thank you for your response. Regarding the complexity of our service, it is relatively straightforward. Its primary function involves mapping one model to another and interfacing with an external API. We have recently implemented WireMock, which is fully recording the incoming and outgoing traffic to/from our service and to/from the external API. Following this integration, we observed on our development environments an increase in latency from approximately 300ms to around 400ms. (which is not really impactful) We are planning to closely monitor this situation as we move forward. Our strategy involves deploying WireMock in the production environment for a brief period. This will enable us to conduct thorough tests using the data recorded during this phase, which we will continue analyzing in an offline setting. Your insights are invaluable, especially regarding WireMock’s capabilities and limitations. We are aware that it’s primarily a development tool and not ideally suited for long-term production deployment. We will ensure to diligently monitor its memory usage, manage data extraction via REST API or storage extensions, and regularly clear caches and logs using the provided admin API endpoints.