Trying to wrap my head around what's possible and how it compares to web sockets. Http2 allows the server to continuously push to client, are there any limits that prevents this from being used to send video packets fast enough for video streaming to work?
is HTTP2 viable for video streaming or real-time multiplayer games?
2.2k Views Asked by Nico Collie At
1
There are 1 best solutions below
Related Questions in WEBSOCKET
- Resolving ElephantIO ServerConnectionFailureException: Error establishing connection to server
- Django socketio process
- How to decode audio stream using tornado websocket?
- Java and React WebSocket - Error Connection
- Socket.io nodejs server .NET connection
- Troubleshooting WebSocket 502 Error in Python Code
- Getting an error in Socket.io wordle project
- Best practices with realtime data / websockets. Send vs. revalidate data
- My socket.io web socket application is not sending data to some users
- Android 13 & 14 seem to close WebSocket connection, if i put app in background, after ~20s
- Audio bytes chunks getting corrupted during streaming using Django and Websockets
- Odoo live chat not working when using apache reverse proxy
- websocket Fatal error message stating "Failed to listen on tcp://0.0.0.0:8080: Address already in use
- Stomp connection using JWT token in Python
- Symphony Fintech (XTS) market-data socket data integration in PyQt6 using python3
Related Questions in TCP
- Java SocketException: Connection reset,. What is the cause?
- How does a server handle multiple requests, and how does is know where to send which response?
- How does pre-allocating a pool of SocketAsyncEventArgs objects upfront improve the performance of a server application in c#
- How to peek or ready to check whether HTTP request or not in TCP proxy?
- How does bash > /dev/tcp/"ip"/"port 0<&1 keep its connection alive?
- Python TCP Server that both sends and or receives data (independently) using asyncio streams?
- Can't remotely connect to my postgresql database on digitalocean
- Why my message doesn't write into the socket when I try to read the response after sending it?
- What makes MQTT a raw tcp connection that we can't run it in the browser?
- ImGui rendering wrong characters (characters received from tcp sockets)
- TCP/IP Server Using sockets Java
- C# tcp socket keepalive I want to visit a website, but the specified time is very slow and I cannot access it
- Java TCP socket want to multiple times input with one connection
- How do I receive TCP messages on an android Emulator from a physcal device
- Getting error while using the MessagePattern to communicate between microservices
Related Questions in GRPC
- gRPC: Asynchronous client thread safety clarification
- gRPC client is slower in C++ than using `ghz` with the same count of threads
- Incorrect/incomplete python pb2 file generation with buf
- Logging interceptor using grpc.aio python
- Shutting down a channel of a client from Server using grpc-java
- Can I create a gRPC recipe for Python4Android to build a firestore kivy app?
- gRPC async server : bad thread scailibility
- Error during signUp: Error: 13 INTERNAL: Received RST_STREAM with code 2 triggered by internal client error: Protocol error
- Should I use string or Value as type in a message for a serialized object?
- Is there a way that allows us to queue multiple grpc requests?
- How do I programmatically enable InternalLogLevel.TRACE for Netty's Http2FrameLogger, relied upon by grpc-java?
- Grpc Java - Failed to set up TLS using boring ssl on Redhat
- how can i use googlemap gRPC in android?
- Least Connection Load balancing using Grpc
- Missing packages in github.com/grpc-ecosystem/go-grpc-middleware upgrading from v1 to v2
Related Questions in HTTP2
- Selenium Wire webdriver cannot browse site
- HTTP/2 POST requests with compressed responses failing ERR_HTTP2_PROTOCOL_ERROR 200 (OK)
- 103 Early hints response not sending properly with HTTP/2 request
- How can I check if client terminated the gRPC connection?
- Received duplicate pseudo-header field b':path' error when I send http2 requests in python
- AWS-LAMP Bitnami | External API Call Error
- Too large Auth-Header in request: okhttp3.internal.http2.StreamResetException: stream was reset: CANCEL
- Enable HTTP/2 instead of http/1.1 on local server
- HttpWebRequest not responding suddenly
- Is it possible to expose WCF services that can be addressed by HTTP/2 ? and how can I do it?
- How to read HTTP2 HPACK compressed headers using tshark
- HTTP2_PROTOCOL_ERROR and ERR_CONNECTION_CLOSED when updating weblogic version 12 to 14
- Inconsistent Browser Support for Alt-Svc Header and HTTP2 Frame Implementation
- How to handle UDP and HTTP2 requests in Springboot using Netty
- How to use hyper server with unencrypted HTTP/2 (H2C)?
Related Questions in SERVER-PUSH
- Is it okay to call rest API in every 5 seconds to receive update Android/iOS UX?
- Vaadin 14 - Closing IFrame after request from an other application
- How to use Vaadin FLOW server-push with Spring Boot
- CUBA Platform push messages from backend to UI
- HTTP Server-Push: Service to Service, without Browser
- What happens when triggering a GET request while a http2 push is in-flight for the same resource
- How web push protocol works?
- HTTP/2 Server Push not working for JavaScript files
- Can a HTTP/2 client choose which resources to receive via Server Push?
- is HTTP2 viable for video streaming or real-time multiplayer games?
- How to fetch values from dict
- With HTTP/2 Push, can I push assets before the initial response?
- HTTP/2 Server Push results in duplicate requests
- How to limit amount of files sent to HTTP 2 / Server Push + Nginx
- How can I check that HTTP2/Server Push works properly?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
HTTP/2 push has been designed to push resources associated to a primary resource.
It is mostly used for browsers, where upon requesting an
index.htmlpage, they get pushedstyle.cssandapplication.jsthat are referenced byindex.html.Technically, it is be possible to stream a video to a client in a single response to a client request (bulk download).
For more advanced features such as buffering a little ahead and only download at video stream consumption, HTTP clients can make range requests.
For download of parallel streams with different resolution - 720p vs 1080p - the client can make two different requests.
HTTP/2 would need to be configured so that clients have a large flow control window (see this answer), but for browsers that is already the case, and most HTTP/2 client libraries do support this kind of configuration.
So it is technically possible, but how would it compare to WebSocket?
WebSocket lacks entirely the notion of metadata, so the application writer would have to invent some metadata format for requests and responses, such the video stream id/title, the resolution, the range, etc. and then download the raw video.
The HTTP/2 frame overhead is 9 bytes, the WebSocket frame overhead is 10 bytes (assuming large-ish frames). However, the max frame size is 16 KiB for HTTP/2 and could be larger for WebSocket, although probably not recommeded to be too large (as the client may decide to not allocate resources for super-large frames sent by the server).
Also, in WebSocket, there is the notion of a max message size. You typically cannot just send WebSocket frames all belonging to the same message, so you will need to split the video into multiple, smaller, messages (but it's just a technicality).
Lastly, HTTP/2 can carry a WebSocket communication in a HTTP/2 stream (RFC8441).
This means that a HTTP/2 request/response can perfectly simulate WebSocket communication: you will have an "infinite" request - one that has request content that never ends (until the communication is closed) - for client to server communication, and an "infinite" response - one that has a response content that never ends (until the communication is closed) - for server to client communication.
In summary, I would not use HTTP/2 push for streaming videos: a normal HTTP/2 response can do the job more efficiently (like WebSocket would).
I see WebSocket really useful for unsolicited communication from server to client. With HTTP/2, the client must always initiate the request.