Review fedmsg-websocket SOP

Signed-off-by: Michal Konečný <mkonecny@redhat.com>
This commit is contained in:
Michal Konečný 2021-08-19 14:22:06 +02:00
parent d5b724b2d8
commit b112d4582b
2 changed files with 16 additions and 16 deletions

View file

@ -31,7 +31,7 @@
** xref:fedmsg-irc.adoc[fedmsg-irc - SOP] ** xref:fedmsg-irc.adoc[fedmsg-irc - SOP]
** xref:fedmsg-new-message-type.adoc[Adding a new fedmsg message type - SOP] ** xref:fedmsg-new-message-type.adoc[Adding a new fedmsg message type - SOP]
** xref:fedmsg-relay.adoc[fedmsg-relay - SOP] ** xref:fedmsg-relay.adoc[fedmsg-relay - SOP]
** xref:fedmsg-websocket.adoc[fedmsg-websocket - SOP in review ] ** xref:fedmsg-websocket.adoc[WebSocket - SOP]
** xref:fedocal.adoc[fedocal - SOP in review ] ** xref:fedocal.adoc[fedocal - SOP in review ]
** xref:fedora-releases.adoc[fedora-releases - SOP in review ] ** xref:fedora-releases.adoc[fedora-releases - SOP in review ]
** xref:fedorawebsites.adoc[fedorawebsites - SOP in review ] ** xref:fedorawebsites.adoc[fedorawebsites - SOP in review ]

View file

@ -2,7 +2,7 @@
websocket communication with Fedora apps. websocket communication with Fedora apps.
see-also: `fedmsg-gateway.txt` See-also: <<fedmsg-gateway.adoc#>>
== Contact Information == Contact Information
@ -17,13 +17,13 @@ Purpose::
== Description == Description
WebSocket is a protocol (an extension of HTTP/1.1) by which client web _WebSocket_ is a protocol (an extension of HTTP/1.1) by which client web
browsers can establish full-duplex socket communications with a server browsers can establish full-duplex socket communications with a server
--the "real-time web". --the "real-time web".
In our case, webapps served from app0* and packages0* will include In our case, webapps served from _app0*_ and _packages0*_ will include
javascript code instructing client browsers to establish a second javascript code instructing client browsers to establish a second
connection to our WebSocket server. They point browsers to the following connection to our _WebSocket_ server. They point browsers to the following
addresses: addresses:
production:: production::
@ -31,16 +31,16 @@ production::
staging:: staging::
wss://stg.fedoraproject.org:9939 wss://stg.fedoraproject.org:9939
The websocket server itself is a fedmsg-hub daemon running on The websocket server itself is a _fedmsg-hub_ daemon running on
busgateway01. It is configured to enable its websocket server component _busgateway01_. It is configured to enable its websocket server component
in the presence of certain configuration values. in the presence of certain configuration values.
haproxy mediates connections to the fedmsg-hub websocket server daemon. _haproxy_ mediates connections to the _fedmsg-hub_ _websocket_ server daemon.
An stunnel daemon provides SSL support. An _stunnel_ daemon provides SSL support.
== Connection Flow == Connection Flow
The connection flow is much the same as in the fedmsg-gateway.txt SOP, The connection flow is much the same as in the <<fedmsg-gateway.adoc#>>,
but is somewhat more complicated. but is somewhat more complicated.
"Normal" HTTP requests to our app servers traverse the following chain: "Normal" HTTP requests to our app servers traverse the following chain:
@ -57,14 +57,14 @@ Client -> stunnel(proxy01) -> haproxy(proxy01) -> fedmsg-hub(busgateway01)
stunnel is listening on a public port, negotiates the SSL connection, stunnel is listening on a public port, negotiates the SSL connection,
and redirects the connection to haproxy who in turn hands it off to the and redirects the connection to haproxy who in turn hands it off to the
fedmsg-hub websocket server listening on busgateway01. _fedmsg-hub_ websocket server listening on _busgateway01_.
At the time of this writing, haproxy does not actually load balance At the time of this writing, _haproxy_ does not actually load balance
zeromq session requests across multiple busgateway0* machines, but there zeromq session requests across multiple _busgateway0*_ machines, but there
is nothing stopping us from adding them. New hosts can be added in is nothing stopping us from adding them. New hosts can be added in
ansible and pressed from busgateway01's template. Add them to the ansible and pressed from _busgateway01_'s template. Add them to the
fedmsg-websockets listen in haproxy's config and it should Just Work. _fedmsg-websockets_ listen in _haproxy_'s config and it should Just Work.
== RHIT == RHIT
We had RHIT open up port 9939 special to proxy01.phx2 for this. We had RHIT open up port 9939 special to _proxy01.iad2_ for this.