Repository navigation
docs: add reverse proxy setup documentation - #4085
Conversation
|
I'll edit this more when it's no longer in Draft mode. |
| --- | ||
|
|
||
|
|
||
| = Deploying Vaadin Applications Behind Reverse Proxies |
There was a problem hiding this comment.
Just an idea: what do you think about a paragraph or block with "Best Practice" or "Recommendation"? Like "Vaadin recommends to add a reverse proxy" or "it's best practice to add a reverse proxy"?
It should emphasis the importance of this topic and is hopefully (?) not controversial - at least I don't know anyone who would say: neh don't need it
There was a problem hiding this comment.
Added an introduction paragraph about benefits of reverse proxying
| Connector ajpConnector = new Connector(PROTOCOL); | ||
| ajpConnector.setPort(ajpPort); | ||
| AbstractAjpProtocol<?> ajpProtocol = (AbstractAjpProtocol<?>) ajpConnector.getProtocolHandler(); | ||
| ajpProtocol.setSecretRequired(false); |
There was a problem hiding this comment.
Note: this line might be controversal
There was a problem hiding this comment.
Updated setting the secret and adding a note about its usage on Apache httpd
| RewriteEngine on | ||
| RewriteCond %{HTTP:Upgrade} websocket [NC] | ||
| RewriteCond %{HTTP:Connection} upgrade [NC] | ||
| RewriteRule ^/?(.*) "ws://vaadin-app:8080/$1" [P,L] |
There was a problem hiding this comment.
Should there be one or two comments: be careful about different ports for AJP and HTTP/WS - and - WS / Rewrite is only required if Push is used with websockets or xhr?
There was a problem hiding this comment.
Good points.
Do you think it would be better to have the comments in the configuration snippets or as a note in the documentation narrative?
There was a problem hiding this comment.
I'm wondering if it would be enough to have a simple "What is web sockets" block that expains like the basic.. it's optional.. is used for asyncronous communication (pushes messages from the server to the client).. uses the http protocol.. ajp does not support it; it requires an http upgrade)
and afterwards add // -- Websockets only (begin) + // -- Websockets only (end) to one example below that.. maybe? I would not want to add this comment in every config tho
There was a problem hiding this comment.
Might be related: Do you think it's worth to have "so many" AJP configurations in the docs? Do we think it's a widespread combination or more like "legacy"? I had this discussion 2-3x in the past with different architects.. Especially since you need to manually configure it in spring boot.
There was a problem hiding this comment.
added a paragraph with a short websockets introduction
| proxy_read_timeout 90; | ||
| ---- | ||
| -- | ||
|
|
There was a problem hiding this comment.
Should there be a chapter about balancing? Or at least mention the pitfalls with stateful flow sessions? Sticky cookies as solution?
There was a problem hiding this comment.
I am currently working on it. Will push changes tomorrow
There was a problem hiding this comment.
drafted something
|
For reviewers that want to test the configuration, here's the repository I used https://github.com/mcollovati/vaadin-reverse-proxy-tests |
|
Looks quite good to me, only commented on some typos etc I happened to notice. |
Part of #1776