Skip to content

Network replay server for testing #11481

@alexey-milovidov

Description

@alexey-milovidov

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions