Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Illarion Kovalchuk
@illarion
Hi @elisarver . Can you please show your config?
dncastilho
@dncastilho
Hey guys, I've just downloaded the latest version of gobetween. I then pretty much used the default provided config to test load balancing to a couple websphere app instances I already had running. however, when hitting the load balancer I am actually redirected to the particular WAS instance URL, which is obviously not what I wanted. I couldn't find anything in the documentation in relation to this, is that expected behaviour?
dncastilho
@dncastilho
FYI, I found out what the problem was. Websphere itself was redirecting. This article is what I had to do to fix it https://www-01.ibm.com/support/docview.wss?uid=swg21569667
K.S.Vignesh
@vignasivakara_twitter

Hello All,

Can we setup MSSQL Mirrored DB for failover in GoBetween?
If the primary database is failed all request should move to secondary IP

Justin Butterworth
@JustinButterwo8_twitter
Hi Guys, has anyone had any luck with the exec health check in windows? I have a really simple scenario which is more failover then load balance, I'm using a batch file and curl to check which site is active but whatever "expected output" I put in the config and the bat file it's always "unexpected" - batch file copies the example in the documentation albeit with my value
@echo off
curl -o nul --silent --head --fail -Is http://%1/
IF /I "%ERRORLEVEL%" NEQ "0" (
echo|set /p Dummy="DOWN"
)ELSE (
echo|set /p Dummy="UP"
)
and the healthcheck is
kind = "exec"
interval = "10s"
timeout = "2s"
exec_command ="C:\myscript\gobetween\healthcheck\exec_healthcheck.bat" # (required) command to execute
exec_expected_positive_output = "UP" # (required) expected output of command in case of success
exec_expected_negative_output = "DOWN" # (required) expected output of command in case of failure
status is always

2019-06-20 07:07:37 [WARNI] (healthcheck/exec): Unexpected output: "UP"

2019-06-20 07:07:38 [WARNI] (healthcheck/exec): Unexpected output: "DOWN"

2019-06-20 07:07:47 [WARNI] (healthcheck/exec): Unexpected output: "UP"

2019-06-20 07:07:48 [WARNI] (healthcheck/exec): Unexpected output: "DOWN"

so it's working and it's seeing it but I can't get the output to match, tried quoting, unquoting etc
Nick Doikov
@nickdoikov
try to use numerical values for up (1) and down (0)
Illarion Kovalchuk
@illarion
why do you do this weird echo | set /p thing?
why not jist echo "UP" or echo "DOWN" ?
Novanet
@Novanet-
if the echo is adding a newline character then it will break it
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?