-
Notifications
You must be signed in to change notification settings - Fork 670
Synchronization cleanup #126
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
Conversation
…ctive requests. Preferring concurrent collections in java.util.concurrent when possible.
…threads may update them through the REST interface. Made some immutable fields final where possible.
…e traffic and log messages when not writing to a HAR
Conflicts: src/main/java/net/lightbody/bmp/proxy/ProxyManager.java
Blacklist with method matcher
Pretty cool -- I'd love to hear more about your usage that pushes so much through it! I was ready to merge this, but sadly it doesn't auto merge. Any change you can update it (I must have pulled in another conflicting PR) and then I'll go ahead and merge it. Thanks! |
Delete unused proxies after expiration time passes
Added data transfer limits
Merge branch 'synchronization-cleanup' Conflicts: src/main/java/net/lightbody/bmp/proxy/BlacklistEntry.java src/main/java/net/lightbody/bmp/proxy/ProxyManager.java src/main/java/net/lightbody/bmp/proxy/http/BrowserMobHttpClient.java
Just updated, should be good to merge now. We're using the proxy to blacklist and whitelist requests for a Selenium grid with several dozen browser sessions running simultanously, and each page makes anywhere from a couple to 50 (!) HTTP requests, resulting in a very large number of concurrent requests coming into the proxy. Overall the proxy performs admirably. The biggest bottleneck I've found so far is threads -- each request to the Jetty server requires its own thread, so we had to reduce stack size significantly in order to avoid OutOfMemory issues caused by the threads' stacks. That's one reason I'm looking into the Jetty code, to see if we can somehow take advantage of Java's NIO to reduce the number of threads we spawn, since most of our threads are just parked waiting for the upstream server to respond. But as you pointed out, enhancing the embedded Jetty in any way is a nearly insurmountable challenge. |
In my use of the proxy, I'm serving a fairly large number of requests simultaneously (several thousand, via Selenium). I started to notice some overhead from synchronization, so I decided to undertake a cleanup of synchronization-related code. This is a large changeset, so I've been testing extensively and have not yet seen any problems -- but I would appreciate feedback on other high-volume scenarios to test.
Summary of changes: