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

Performance during MiTM #6

Open
hazcod opened this issue Oct 30, 2020 · 4 comments
Open

Performance during MiTM #6

hazcod opened this issue Oct 30, 2020 · 4 comments

Comments

@hazcod
Copy link

hazcod commented Oct 30, 2020

Hi, just to let you know that when using mitmHandler, a lot of CPU time is spent in mitm_handler.transmit.

image

Not sure if the client-side connections are pooled?

@hazcod hazcod changed the title Performance Performance during MiTM Oct 30, 2020
@telanflow

This comment has been minimized.

@telanflow
Copy link
Owner

telanflow commented Oct 31, 2020

the reason for the TLS handshake should be that you did not reuse the connection for each request.

You need to pay attention to:

The client needs to reuse the connection every time it initiates a http request. Otherwise the http request will re-create the connection, resulting in repeated TLS handshake

@hazcod
Copy link
Author

hazcod commented Oct 31, 2020

Hi @telanflow , i'll check the http protocol version.
So what does this todo refer to then? https://github.com/telanflow/mps/blob/master/mitm_handler.go#L134

@hazcod
Copy link
Author

hazcod commented Nov 1, 2020

@telanflow Interesting, I've disabled connection: close on request & response and always use HTTP/1.1.
image

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