creack / goproxy Goto Github PK
View Code? Open in Web Editor NEWGoProxy is a ReverseProxy / LoadBalancer helper for Golang
License: MIT License
GoProxy is a ReverseProxy / LoadBalancer helper for Golang
License: MIT License
if err != nil {
reg.Failure(serviceName, serviceVersion, endpoint, err)
// Failure: remove the endpoint from the current list and try again.
endpoints = append(endpoints[:i], endpoints[i+1:]...)
continue
}
This is thread unsafe, the modification of the slice should be placed inside reg.Failure and be protected by lock.
Hello,
I'm using your code and when I got the logic working for my service, I noticed that it would only connect to one of the nodes I wanted to proxy to and not switch. What I was hoping for was that it would switch between nodes on every connection. (FYI, I implemented a round-robin algorithm)
So, my question is: should DisableKeepAlives be set to true on the http.Transport variable created in NewMultipleHostReverseProxy? Or am I missing something? Perhaps this could be something that is set when you call the method?
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.