Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Lior Margel
@MargelLior_twitter
i need first to make the gb listen in port 200. Till then it will not work. Let me check this first.
thanks for all your help till here : )
Illarion Kovalchuk
@illarion
You are welcome
Lior Margel
@MargelLior_twitter
it looks better now but still not working 100% yet.
I can see now that in netstat on the Gobetween server the port 200 i conf is listening ok.
But when i telnet to this port it is not working.
ALso on the log file i do not see any data that can show that the data is getting to the GB server.
Here is the log file:
2018-07-15 04:17:50 [INFO ] (manager): Initializing...
2018-07-15 04:17:50 [INFO ] (api): API disabled
2018-07-15 04:17:50 [INFO ] (server): Creating 'sample': localhost:200 roundrobin static none
2018-07-15 04:17:50 [INFO ] (scheduler): Starting scheduler
2018-07-15 04:17:50 [INFO ] (manager): Initialized
2018-07-15 04:21:53 [INFO ] (manager): Initializing...
2018-07-15 04:21:53 [INFO ] (api): API disabled
2018-07-15 04:21:53 [INFO ] (server): Creating 'sample': localhost:200 roundrobin static none
2018-07-15 04:21:53 [INFO ] (scheduler): Starting scheduler
2018-07-15 04:21:53 [INFO ] (manager): Initialized
2018-07-15 14:26:35 [INFO ] (api): API disabled
2018-07-15 14:26:35 [INFO ] (manager): Initializing...
2018-07-15 14:26:35 [INFO ] (server): Creating 'sample': localhost:200 roundrobin static none
2018-07-15 14:26:35 [INFO ] (scheduler): Starting scheduler
2018-07-15 14:26:35 [INFO ] (manager): Initialized
Any ideas ?
Lior Margel
@MargelLior_twitter
hi. What is the recommended linux distribution and version for installling on it go between LB ? Any officel documentation about recommnded linux ?
Queryly
@Queryly_twitter
I have a quick question on the healthcheck using exec. Ideally, I want to remove one of the backend hosts if exec check returns 0, but it seems that healthcheck is bound to "server", not its hosts.
A similar question on removing a host programmatically - Can the REST API remove one of the backend hosts within a server?
Queryly
@Queryly_twitter
In other word, how do I remove hosts in static_list = [...] programmatically?
Illarion Kovalchuk
@illarion
Healthcheck works exactly this way -- disabling backends that are not available
Queryly
@Queryly_twitter
Illarion, Thanks! I found out the exec is called on each host which makes sense. Do you know if disabling backend host is supported via REST API? I saw there is add server and remove server method, but not for the host (in the static_list). Any thought?
Illarion Kovalchuk
@illarion
@MargelLior_twitter any modern linux distro should be ok, we have no strict requirement
@Queryly_twitter it is not implemented yet feature - programmaticaly modify list of backends. Hope we will have enough time to implement this.
Queryly
@Queryly_twitter
@illarion Thanks for the quickly response. To simulate the effect of modifying the static_list, is it possible to use REST API to remove an exciting "server" and then add it back with a new "static_list"? or just add the same "server" with a different static_list and hope it will overwrite the old one?
Illarion Kovalchuk
@illarion
@Queryly_twitter you can try removing and adding back, but this may drop connections
Btw, why not just use json or text discovery?
Queryly
@Queryly_twitter
@illarion I will read up on discovery as I am not very familiar with it yet. My goal is have a more flexible way to route traffics based on some business logic (so REST API sounds very appealing to me). I think removing and adding back sounds like a plausible solution as dropping stateless HTTP connections for a few seconds is acceptable.
Illarion Kovalchuk
@illarion
Discovery is the source of list of backends, there are powerful things such as docker and consul discovery and flexible json and txt for whatever you can imagine
Gb queries selected discovery methid periodically and modifies list of backends
*method
You can even have exec discovery
Really flexible thing
And healthcheck lets you mark backends live and dead temporarily depending on their availability
Queryly
@Queryly_twitter
@illarion Cool. Thanks for the tip. I will read up on it. I am also learning Go. I really like Gb and hope to be able to contribute to some code in future :-)
Illarion Kovalchuk
@illarion
There is a plenty of issues, you can try your skills on any of them :)
Queryly
@Queryly_twitter
@illarion I notice a few times that the gobetween console seems freeze and wouldn't quite with Control + C. If I close the console by closing the command prompt window, the ports are not released. I would have to reboot the server to restart gobetween again. I haven't been familiar with Golang to dig into the code yet. You probably have already done so, but just want to check in to see if there is away to close connections before the application shutdown/crash.
@illarion Thanks for the tip on discovery. I was able to configure the discovery using JSON to simulate active/passive mode. I run into some issues, but they are mostly Window Server related and I was able to get over them with wrokaround.
Queryly
@Queryly_twitter
@illarion just to correct one thing. I actually wasn't able to shut the gobetween.exe process in task manager. when I ended its the process, an error message say "The operation is not able to completed. access is denied". So there is no way to shut it down without a reboot. No HTTP request is routed after that.
Illarion Kovalchuk
@illarion
@Queryly_twitter did you make any modifications to gb in order to make it windows service?
Or maybe you simply run it from another user
With higher priveledges
Queryly
@Queryly_twitter
@illarion I simply run it from the command prompt with admin privilege. I didn't modify any code.
darkl0rd
@darkl0rd
Hey guys, anyone who can tell me whether it's possible to do a) TLS termination b) based on the SNI header route one part of the traffic (TCP) to a given backend c) when the SNI doesn't match anything, treat it as HTTP traffic and do "regular" path based routing?
I'm currently investigating several solutions for doing this - Traefik only does L7, HaProxy can do it, but there is no dynamic backend configuration - docker flow proxy seems a viable candidate, except it can't create the tcp/http mix out of the box which I described.. so I just ran into your tool this afternoon, which seems promising, but before I start fiddling again - I was hoping someone might just be able to tell me whether it's possible or not.
darkl0rd
@darkl0rd
OK - never mind either way, just discovered that Docker Swarm doesn't work either :) I'll check back on this in a few months .. back to Docker Flow Proxy I guess.
Nick Doikov
@nickdoikov

you can add something like :

hostname_matching_strategy = "regexp"
unexpected_hostname_strategy = "default"

in . sni server section

Andrew Stanton
@acstanton515

I'd like to run gobetween in AWS ECS. But having hard time figuring how to pass it a default configuration. CloudWatch logs show:

gobetween v0.5.0
open /etc/gobetween/conf/gobetween.toml: no such file or directory

I see some volume options in ECS container definition, but not seeing how I would get a config file there to map to the /etc/gobetween/conf

I saw we can tell gobetween to use URL for config file, but the Dockerfile in GitHub specifically calls command options for hardcoded path.

CMD ["/usr/bin/gobetween", "-c", "/etc/gobetween/conf/gobetween.toml"]

So when attempting to pass env variables via ECS, we get a different error

gobetween v0.5.0
Passed GOBETWEEN env var and command-line arguments: only one allowed

Would it be possible to publish a different Dockerfile tag on yyyar's account for a more ECS friendly version, like with no static file configuration passed, so we can use the environment variable approach? Or any other ideas?

Andrew Stanton
@acstanton515

Okay, I figured out the way to do this in ECS Fargate.... I'm sure there are multiple paths to doing it without requiring any work from Gobetween team. But, the way I was able to do it was to override Dockerfile CMD by defining entryPoint in the container definition which I am sure would be easy for anyone with Docker experience to think of (this is my day 2 of exploring Docker and mostly through the lens of ECS):

"containerDefinitions": [
{
...
"entryPoint": [
"/usr/bin/gobetween"
],
...
"environment": [
{
"name": "GOBETWEEN",
"value": "[\"from-url\", \"http://some.url/gobetween.toml", \"-f\", \"toml\"]"
}
...

Illarion Kovalchuk
@illarion
thank you, we will update the doc
Yaroslav Pogrebnyak
@yyyar
gobetween now on Telegram! Announcing our official Telegram group here: https://t.me/joinchat/GdlUlg_gRfchk1BORU82PA Join now! :-)
Yaroslav Pogrebnyak
@yyyar
Also, to support gobetween please submit your use case here yyyar/gobetween#161 :-) Thank you so much!
Krast
@krast
hello, I try gobetween v0.6.0. tcp loadbalance roundrobin mode not work.

[servers.krast]
protocol = "tcp"
bind = "0.0.0.0:3000"
balance = "roundrobin"

max_connections = 10000
client_idle_timeout = "10m"
backend_idle_timeout = "10m"
backend_connection_timeout = "2s"

[servers.krast.discovery]
kind = "static"
static_list = [
"127.0.0.1:4000 weight=1",
"127.0.0.1:2000 weight=1"
]

[servers.krast.healthcheck]
fails = 1
passes = 1
interval = "1s"
timeout="1s"
kind = "ping"
ping_timeout_duration = "500ms"

I expect 4000,2000 next round 4000,2000 again and again. but not working as expected.
Can I use gobetween instead of haproxy?
Krast
@krast
image.png
My test like this.
simple http backend.
Illarion Kovalchuk
@illarion
@krast yes. I confirm the bug. Will be fixed soon in 0.6.1
Dave Cottlehuber
@dch
I see you have FreeBSD binary available, but I'd like to build from sources and include in FreeBSD ports tree. I tried some minor modifications but failed to get it working.
if you're able to help further I will open an issue on github to discuss