https://github.com/pgjones/http2_multiplexing_article
https://github.com/pgjones/http2_multiplexing_article
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/pgjones/http2_multiplexing_article
- Owner: pgjones
- Created: 2019-01-21T00:11:28.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-01-21T01:14:21.000Z (over 7 years ago)
- Last Synced: 2025-02-16T19:33:28.844Z (over 1 year ago)
- Language: HTML
- Size: 4.88 KB
- Stars: 3
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
Awesome Lists containing this project
README
HTTP/2 Multiplexing
===================
This is the code to accompany an `article
`_.
Running
-------
Assuming you have at least Python 3.7, firstly to setup:
.. code-block::
$ python -m venv venv
$ source venv/bin/activate
$ cd app
$ pip install -r requirements.txt
Then you can either run with the HTTP/1.1 (h11) or HTTP/2 (h2)
configuration,
.. code-block::
$ hypercorn --config="python:h11_config.py" run:app
$ hypercorn --config="python:h2_config.py" run:app
Performance
-----------
The purpose of this code is to demonstrate the efficiency of HTTP/2
multiplexing by comparing the total time to make all twenty requests
under HTTP/1.1 and HTTP/2. HTTP/2 WebSockets are only possible (as of
early 2019) in Firefox (chrome requires an additional flag change).