olivere / balancers Goto Github PK
View Code? Open in Web Editor NEWImplementation of HTTP load-balancers.
License: MIT License
Implementation of HTTP load-balancers.
License: MIT License
My team is using the load balancer to horizontally scale and provide processing retention for an application that does cpu intensive calculations on data. The issue we are running into is that it doesn't seem configuring transport attributes on the RoundTripper is not quite opened up for us yet, unless its intended for us to use the http.DefaultTransport. We want to change the MaxIdleConns and MaxIdleConnsPerHost to help avoid time_waits when making requests. Perhaps leaving a parameter open for us when creating the balancer to set our transport will be useful. Just a suggestion really.
There is a lack of documentation on this tool. It would be really helpful to provide usage examples both simple and advanced to help describe usage. Currently the only way to see this is via your test cases.
I haven't investigated the details, but the RoundRobin balancer seems to leak memory.
I found out by using it with a service that needed to send big payloads (like, multi megabytes payloads) at recurring intervals. Somehow, removing the RoundRobin and using a randomly built URL solved the problem, so I expected the balancer's logic to be faulty somewhere.
I'll take the time to do a working example of this later to demonstrate the problem.
Currently it seems that a connection is considered broken if the url provided to the balancer throws an error or returns any status code other than 200. Ideally, I think the case for a valid endpoint would simply just be the connection as, in our case anyway, the root url we provide returns a status of 404 because nothing is provided at our root location. However, it still is considered "up" and/or can receive connections.
Example
http://ourendpoint:80 -> 404
http://ourendpoint:80/path/to/res -> 200
A valid endpoint should be justified in terms of whether or not is connecting or not i think. If we have an issue with our res then that's our problem. Maybe provide an option to remove an endpoint from the balancer if the amount of certain status codes besides 200 exceeds a specified amount? Not sure. I just wanted to open it up for discussion.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.