bamboo icon indicating copy to clipboard operation
bamboo copied to clipboard

Do we can support websocket feature

Open xiaods opened this issue 9 years ago • 11 comments

Currently we ran into a case for websocket instance. but i found it need bamboo can support is_websocket detect function, anyone interesting it?

xiaods avatar Apr 03 '15 12:04 xiaods

I am :)

j1n6 avatar Apr 03 '15 12:04 j1n6

@activars How would you solve this issue? Have any plans?

hyper0x avatar Apr 07 '15 02:04 hyper0x

There are a couple of dependent tasks in order:

  1. Multiple services in a task #30
  2. TCP loadbalalcing (adding load balancing protocol options in the UI and API, also detecting protocol if possible) #26
  3. Then we have protocol, this would help to implement websocket

j1n6 avatar Apr 07 '15 09:04 j1n6

Maybe I can do a small improvement. What about this:

Add the following two lines to 'defaults' section in haproxy template file:

option  http-server-close
timeout tunnel  3600s

I will commit a pull request, then we talk about this, OK?

hyper0x avatar Apr 07 '15 09:04 hyper0x

not ideal in my opinion, I would like to preserve the existing behaviour.

j1n6 avatar Apr 07 '15 09:04 j1n6

https://github.com/QubitProducts/bamboo/pull/110

OK,it's just a try.

We will do for now, then follow your opinion & revision.

hyper0x avatar Apr 07 '15 09:04 hyper0x

@activars your issue have fixed right now. i don't understand the mean of "Then we have protocol, this would help to implement websocket"

xiaods avatar Apr 18 '15 23:04 xiaods

The issues are not fixed, but they will be in the next big release. It should be possible to hack it to work with websocket at the moment. I would like to find a design in the next release to handle this in a clean way. What I meant was being able to get protocol information from Marathon (and Bamboo should be able to provide additional protocol overrides when needed).

The hack solution is setting a custom environment variable in Marathon App. You should be able write a if/else special case in template to render the template for websocket. Environment variable is available in template.

j1n6 avatar Apr 19 '15 00:04 j1n6

Here's the documentation: https://github.com/QubitProducts/bamboo#customize-haproxy-template-with-marathon-app-environment-variables

j1n6 avatar Apr 19 '15 14:04 j1n6

Does this ticket possibly also cover the issue of long-running connections (that web sockets often represent) making HAProxy restarts difficult? The two obvious solutions of either having to kill the connections or waiting potentially very long for them to complete aren't options for us.

timoreimann avatar Apr 20 '15 15:04 timoreimann

need send SIGTERM

xiaods avatar Nov 12 '15 17:11 xiaods