Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add slowlog feature #651

Open
kukey opened this issue Sep 21, 2021 · 2 comments
Open

add slowlog feature #651

kukey opened this issue Sep 21, 2021 · 2 comments

Comments

@kukey
Copy link
Contributor

kukey commented Sep 21, 2021

Problem:
Sometimes we need to check what response was slowly, but tweproxy now only support log(every request), it`s very inconvenient.

Solution:
Provide slowlog command like redis slowlog command and return.
I have implemented the redis part , like this:

微信图片_20210921130811

I`ll sort my code and send it out!

@TysonAndre
Copy link
Collaborator

  1. I don't think this is within the scope of the project and don't plan to add it
  2. The redis slowlog feature is the time take on the server - the time taken on the client will vary widely for reasons outside the control of twemproxy, such as network packet loss causing delays (not applicable within the server's own counting, that's counting just time to process the request, compute/encode the response), high cpu load in unrelated programs causing delays, etc., and may be inactionable.
  3. Twemproxy's logging is disabled at verbose level at compile time by default (see ./configure --enable-debug=..., and is skipped based on the nutcracker -v $level option. This would add additional time to processing each request for a feature that would be used pretty rarely and have the drawbacks in 2.

@kukey
Copy link
Contributor Author

kukey commented Sep 22, 2021

1 and 2, I do not think so. This feature is used for Judge whether the reason is from client to proxy or proxy to server when causing delays.
3. yeap, but it is for every request. Sometime we only care about a certain range of timeout request.

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

No branches or pull requests

2 participants