Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Novanet
@Novanet-
i use "0" and "1", my batch file calls a powershell script which then does a "Write-Host '0' -NoNewLine" or "Write-Host '1' -NoNewLine" depending on the server health
Illarion Kovalchuk
@illarion
So, as conclusion, it does not matter is it '0' or 'DOWN' - the problem is probably the extra newline
Wait, we got it
your script outputs "UP" with "
including quotation symbols
@JustinButterwo8_twitter
Yaroslav Pogrebnyak
@yyyar
Yep, from source: log.Warn("Unexpected output: ", out)
so "UP" does not match with UP :-)
So somehow remove quotes around UP and DOWN from healthcheck script output and it should fix the issue :-)
Illarion Kovalchuk
@illarion
I am not using windows, so can't check, but as I understand, you need to replace echo | set ... with just echo UP
and echo DOWN
Miunh
@Miunh
Hi,
I'm a newbie. This's first time I use gobetween. I want to config sample Load balancing for two webservice, which request come from domain: mydomain.com to IP of server installed gobetween. But I can't see any documentation for it. I'm setting on my windows server 2012. I really need your help, are there anyone who can help me?
Thanks so much!
Illarion Kovalchuk
@illarion
Hi! You can try use default config. It is the main source of examples
Shantanu Gadgil
@shantanugadgil
@Miunh for experiments sake, I would recommend using the gobetween in binary form and for test backend I can recommend using gowebhello.
you should be able to get a very simple setup going on a single machine, before going on to bigger things :)
Miunh
@Miunh

Hi! You can try use default config. It is the main source of examples

Hi! In the default config, I can not see anything to detect domain name? How do I define it? Thank you for your help.

This is my config.
[servers.gklb]
bind = "localhost:3000"
protocol = "tcp"
balance = "weight"

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

[servers.gklb.discovery]
kind = "static"
static_list = [
"IP server 1:80 weight=1",
"IP server 2:80 weight=1",
]
[servers.gklb.healthcheck]
fails = 1
passes = 1
interval = "2s"
timeout="1s"
kind = "ping"
ping_timeout_duration = "500ms"

And I want [bind = "localhost:3000"] is my domain which is used by end user on your browser.

Shantanu Gadgil
@shantanugadgil
@Miunh if you replace localhost with yourmachine.yourdomain.tld it depends on what it evaluates to (nslookup yourmachine.yourdomain.tld)
if you want to start off, you can change localhost:3000 to 0.0.0.0:3000 this will make GB listen on all interfaces.
Miunh
@Miunh
@shantanugadgil Thank you so much. I'll try it.
theherodied
@theherodied
Hello, new to GoBetween and have a few questions. For the health checks, how would one simply check of the port is open on the destination host
I'm familiar with Haproxy and looking to replace most of the load balancing for tcp and udp ports to a Graylog cluster.
theherodied
@theherodied
Thinking I could just use exec with something like "nc -z <host> <port>"
Shantanu Gadgil
@shantanugadgil
@theherodied the simplest healthcheck os of type ping. Couple that with the appropriate discovery block and you will get the appropriate end result.
Pitangueiras
@Pitangueiras
Hi. I have a question regarding
I have a question regarding exec healthcheck.
Pitangueiras
@Pitangueiras
exec_command = ["/path/to/healthcheck.sh", <host>, <port>]
Does it mean that <host> and <port> will be substituted, each time, by every host and port available in the [servers.udpsample.discovery] section?
Sorry, I mean [servers.sample.discovery], because in my use case, it is kind = "static".
Lucas Vargas Noronha
@dracoboros
Hello, I am trying to install GB from source in my macos, however when I ran "make" it complains about depencies:
go: github.com/yyyar/gobetween@v0.0.0-00010101000000-000000000000 requires
        github.com/flosch/pongo2@v0.0.0-20181225140029-79872a7b2769 requires
        github.com/go-check/check@v1.0.0-20180628173108-788fd7840127: invalid pseudo-version: major version without preceding tag must be v0, not v1
how can I solve this?
Lucas Vargas Noronha
@dracoboros
I am using go 1.13.4
Lucas Vargas Noronha
@dracoboros
The problem is version 1.13. Managed to successfully install with 1.12.4
Jobin Joseph
@jobinparayil_twitter
@Hi all,
Currently we are using HA proxy as load balancer and planing to migrating to gobetween. From the documentation page i could see that gobetween support proxy Mode.Will gobetween does like HA proxy does SSL Pass through where no encryption/decryption in LB side . We dont want the load balancer to do the encryption/decryption of data again, instead of that we want the data to be passed to the backend server without looking into anything.Will it support as pure TCP load balancer.
Thanks.
Shantanu Gadgil
@shantanugadgil
Gobetween is a L4 ONLY load balancer for now.
So yes, it does SSL pass through, though I have forgotten if PROXY v2 is supported by GB. I definitely know that PROXY v1 is supported
Btw, could you elaborate on your existing HAProxy config , so as to know which all options of HAProxy you are currently using. (Be sure to remove sensitive information from the config)
Jobin Joseph
@jobinparayil_twitter
hi Shanthanu,
Thanks for the reply. im using HA proxy , proxy relay mode
bind *:443
mode tcp
Jobin Joseph
@jobinparayil_twitter
hi Shanthanu,
Also similar to HA proxy what is the sample config for SSL passthrough in GB,Is it the TLS proxy config in the Toml config file.
Thanks.
Jobin Joseph
@jobinparayil_twitter
Hi Shanthanu,
One more query may i know TLS proxy and TLS pass through are same in GB.
Rob Alfonso
@ralfonso-directnic
Hello, I keep getting "dial tcp X.X.X.X:80: i/o timeout" in my log every 6 hours or so on my gobetween instance and then it stops responding until I restart it. I can't seem to find any issue on github, does anyone know what is causing this or what I can do to mitigate?
shahidkratin
@shahidkratin
Hello,
can I achieve the HA of redis using gobetween
?
Hello,
shahidkratin
@shahidkratin

Following is the Scenario I need to achieve:
A Redis master-slave replication setup with sentinel which will be load balanced by gobetween where gobetween will direct all write hits to the master.

This is possible with HAProxy as it checks which node is master internally.
link-> https://karlstoney.com/2015/07/23/redis-sentinel-behind-haproxy/

Can gobetween Do the same?

Natalio
@NcGatti_twitter
Hi, good morning for everyone. I am testing gobetween as a UDP reverse proxy, for load balancing and failover. The load balancing is working good, but it isn't doing failover. I added a custom healthcheck, I can see that it is marking a backend as failed, but it doesn't re-routing the requests
Can I share with you my config and see what am I missing?
Ronny Trommer
@indigo423

Hello everyone, I try to get a minimal gobetween UDP sample up and running. I get the error message:

udp-lb    | 2020-02-09 19:30:35 [FATAL] (manager): udp protocol requires to specify at least one of (client|backend)_idle_timeout, udp.max_requests, udp.max_responses

I ran out of ideas why this happens. This here is my configuration file and the docker-compose.yml. Any hints would be appreciated.

Nick Doikov
@nickdoikov
try to move defaults to the server section , also you still need
udp.max_requests=
udp.max_responses=
Ronny Trommer
@indigo423

@nickdoikov Got it to work, thanks a lot for your help. My next goal is to test the transparent transport. I moved to the latest docker image cause the docs mention it is available in 0.8.0+. Here is my configuration file. There is a hint in the docs which means:

if true - work in transparent mode, when forwarded udp packets have client source address (requires additional host configuration) (since 0.8.0)

Anyone with some hints where I can read which additional host configurations are required? Thank you in advance

jrAtAustin
@jrAtAustin
When I enable health check I get the following error: