-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Network replay server for testing #11481
Copy link
Copy link
Closed
Labels
Description
The idea of this feature is from @4ertus2, we discussed it today.
Capture network interaction (requests and responses) from clickhouse-server.
Make clickhouse-mock server that will use this dump to provide the same responses to the same requests.
Use it for backward compatibility checks in distributed setups.
Tricks and caveats:
- it should reply with the best suitable response based on the history of requests;
- it should track connection identifier to allow to keep a chain of requests and responses;
- it will not take into account all timing issues;
- real requests can be slightly different from expected... for example, by client name.
Possible way of implementation:
- hook into send/recv functions and dump data into system.network_dump table;
- mock server can load the data from dump in any supported format, keep it in memory and find the best response based on search by a tree of previously seen requests at the same connection.
Reactions are currently unavailable