Open wohali opened 6 years ago
since all this went down, we kinda sorta decided we don’t want to go down the cowboy route. Alternatives are TBD.
Since haproxy has H2 support now, and since it is useful to run it even in front of a single instance CouchDB, we have some time to get to this.
This then enables follow on features like replication over WebSockets
Huge +1 for support of replication through WebSockets since it saves a lot of overheads. Also would be awesome to be able to use WebSockets to connect to CouchDB at some point.
EDIT: from what I understood, WebSockets over SSL (WSS) create a secure channel between the client and the server, which avoids the need for authenticating for each request.
IBM Cloudant supports HTTP/2 : "HTTP2 support for higher performance connections to IBM Cloudant" (https://github.com/IBM/cloudant-java-sdk)
@yhilem Yup, and they also use a proxy in front of CouchDB. This is recommended standard practice. Terminate your HTTP/2 (or QUIC!) SSL connection at e.g. haproxy, then haproxy forwards it on to CouchDB.
@wohali please tell me when you want to implement http2 in CouchDB. I watched that you see is created on 2018. Please tell me when you you want to implement it on CouchDB.
I'm just a project management committee member here, not an implementer on this type of feature.
Implementing this is a lot of work. Pull requests are welcome!
I think Jan's original notes are still spot-on a few years later, with "Cowboy" as a proxy for "some modern Erlang / Elixir HTTP server" and "2.0 / 3.0" replaced with "3.0 / 4.0".
If we decide to move forward on the versioned API topic currently under discussion on the ML I would advocate for the 4.0 API to pull in a new HTTP server that would deliver HTTP2 support amongst other goodies.
There is an erlang HTTP/2 server that supports many of the exciting HTTP/2 features like server-push, which can be used for pub/sub and event notification: https://github.com/tatsuhiro-t/lucid
It is MIT licensed, which is Apache compatible and pure erlang. "Do one thing and do it well" Let lucid make the best http/2 erlang server, and then Couch can benefit. This would be native erlang events triggered by HTTP/2 and distributed to any compatible client - a javascript client running PouchDB would be made both made more efficient. HTTP/2 fits the couchDB ethos so much better than any alternative right now.
This project was started primarily for the author to learn Erlang/OTP.
...and has not been updated since 2015. This would not be a good fit for CouchDB long term.
Cowboy has wide adoption and support http/2 streams: https://github.com/ninenines/cowboy
On Mon, Dec 12, 2022 at 6:25 PM Joan Touzet @.***> wrote:
This project was started primarily for the author to learn Erlang/OTP.
...and has not been updated since 2015. This would not be a good fit for CouchDB long term.
— Reply to this email directly, view it on GitHub https://github.com/apache/couchdb/issues/1497#issuecomment-1347657356, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAD7MNZYOFKWFNB5V6VHH6LWM7NB7ANCNFSM4FOIW6AA . You are receiving this because you commented.Message ID: @.***>
How about https://github.com/mtrudel/bandit ?
If it's integrates and works well with Erlang. To me, cowboy so far seems the most promising and been around the longest. Even started to gain some experimental HTTP3 support lately, as well.
@janl: