Skip to content

Conversation

@nkaradzhov
Copy link
Collaborator

The purpose for this PR is to extend the proxy to provide couple of new functionalities:

  • request/response
  • response transformations
  • resp support

Copy link

@jit-ci jit-ci bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ The following Jit checks failed to run:

  • secret-detection-trufflehog

#jit_bypass_commit in this PR to bypass, Jit Admin privileges required.

More info in the Jit platform.

@nkaradzhov
Copy link
Collaborator Author

#jit_bypass_commit

Copy link
Member

@bobymicroby bobymicroby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I've left some minor improvement suggestions.

this.emit('data', connectionId, 'client->server', data);
serverSocket.write(data);

if(!this.interceptorInitializer) {
Copy link
Member

@bobymicroby bobymicroby Oct 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering if we can eliminate the branch prediction (if(!this.interceptorInitializer)) entirely by implementing a default "socket write/noop" interceptor that simply performs the socket write when no initializer is provided.

Copy link
Collaborator Author

@nkaradzhov nkaradzhov Oct 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, we can totally do this, in fact it was like that before, but i thought this is better. i will move it back

interface ActiveConnection extends ConnectionInfo {
readonly clientSocket: net.Socket;
readonly serverSocket: net.Socket;
inflightRequestsCount: number
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about borrowing from node-redis's cache stats approach ? We could start by tracking inflightRequestsCount initially and add more metrics later. This design integrates well if you want to hook in traces, metrics, or logs.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is only to distinguish between request/response and push for now. it will go away in nest iteration

@nkaradzhov nkaradzhov marked this pull request as ready for review October 21, 2025 11:47
@nkaradzhov nkaradzhov merged commit b8267c9 into redis:master Oct 21, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants