Comments (4)
@FZambia The description above is for serving TLS, it doesn't cover H2C. The limitation is technical and I don't have a reasonable justification, so I'll leave this as 'nice to have'.
from centrifugo.
Hello, Centrifugo already supports HTTP/2 out of the box.
You need to configure TLS to make it work. For example, with mkcert tool:
β― mkcert localhost 127.0.0.1 ::1
Created a new certificate valid for the following names π
- "localhost"
- "127.0.0.1"
- "::1"
The certificate is at "./localhost+2.pem" and the key at "./localhost+2-key.pem" β
Run Centrifugo with TLS:
./centrifugo --tls --tls_cert localhost+2.pem --tls_key localhost+2-key.pem --api_insecure
Note, api_insecure
is only to simplify example here.
Then check API response:
curl -X POST "https://localhost:8000/api/info" --data '{}' -v
You will see HTTP/2 headers:
* SSL certificate verify ok.
* using HTTP/2
* h2 [:method: POST]
* h2 [:scheme: https]
* h2 [:authority: localhost:8000]
* h2 [:path: /api/info]
* h2 [user-agent: curl/8.1.2]
* h2 [accept: */*]
* h2 [content-length: 2]
* h2 [content-type: application/x-www-form-urlencoded]
* Using Stream ID: 1 (easy handle 0x13f80c600)
> POST /api/info HTTP/2
> Host: localhost:8000
> User-Agent: curl/8.1.2
> Accept: */*
> Content-Length: 2
> Content-Type: application/x-www-form-urlencoded
>
* We are completely uploaded and fine
< HTTP/2 200
< content-type: application/json
< date: Mon, 11 Mar 2024 16:00:49 GMT
Then check admin UI:
See also: https://centrifugal.dev/docs/faq#does-centrifugo-work-with-http2
Having said this all, I don't see the problem with HTTP 1.1, I doubt about significant practical benefits here. So supporting H2C should be justified by a practical reason.
from centrifugo.
Itβs not about a benefit, but rather a limitation I had and wanted to avoid putting it behind proxy.
from centrifugo.
Could you please explain what kind of limitation? Does the above description solves it for you?
from centrifugo.
Related Issues (20)
- [feature] Silently Reject Publish Attempts on Proxied Channel Without Sending Client Errors HOT 4
- [question] What are the ways of decreasing the message payload? HOT 1
- [feature] Better error message when subscription token is used as connection token
- Unable To Connect With anonymous mode HOT 4
- [feature] Send server time in initial connect response. HOT 2
- [question] Upgrading to 4.1.5 increase in response time HOT 3
- "Websocket Is Closed Before The Connection Is Established" - Web console error HOT 8
- [feature] Support for MessagePack Serialization HOT 2
- How to add multyple aud for a token in config file HOT 1
- [question] History StreamPosition and circular offsets. HOT 7
- [question] Centrifugo customization HOT 13
- [question] Support for Rate Limiting Messages Sent to Clients HOT 2
- [bug] centrifugo-pro not getting OnPublishEvents when using a token with channels claim HOT 4
- [bug] Can't pull history with channel JWT HOT 7
- [bug] With protobuf binary, RPCRequest.Data is empty. HOT 3
- [question] jwt invalid token in subscriptions HOT 3
- `bad request` and `disconnect` immediately after connection established HOT 6
- [question] When using gzip compression, http_stream transport fails to connect because of timeout. HOT 4
- [question] Get list of channels that have history HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from centrifugo.