Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Documentation:System] HTTP/2 Changes #438

Merged
merged 20 commits into from
Dec 13, 2023
Merged

[Documentation:System] HTTP/2 Changes #438

merged 20 commits into from
Dec 13, 2023

Conversation

Viyerelu23333
Copy link
Contributor

@Viyerelu23333 Viyerelu23333 commented Jun 22, 2022

@Viyerelu23333 Viyerelu23333 marked this pull request as ready for review June 22, 2022 04:59
@bmcutler bmcutler requested a review from MasterOdin August 26, 2022 15:49
Copy link
Member

@cjreed121 cjreed121 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The sysadmin version needs to be updated

@bmcutler bmcutler merged commit bd5f74f into main Dec 13, 2023
3 checks passed
@bmcutler bmcutler deleted the sysadmin-note-http2 branch December 13, 2023 01:33
bmcutler added a commit to Submitty/Submitty that referenced this pull request Dec 13, 2023
### Please check if the PR fulfills these requirements:

* [x] Tests for the changes have been added/updated (if possible)
* [x] Documentation has been updated/added if relevant
(Submitty/submitty.github.io#438)

### What is the current behavior?

Closes #3850 

Currently, the Apache2 serves all content in HTTP/1.1. And the server
uses `prefork` as the multiprocessing module. The module is introduced
by `mod_php`, which is not used in production.

### What is the new behavior?

Most browsers only support HTTP/2 when the TLS is enabled. The script
will also enable HTTPS feature in the development environment. If a
browser does not support HTTP/2, then the server will serve contents in
HTTP/1.1.

Developers could use `dev-upgrade-h2.sh` to change the HTTP version:

- `dev-upgrade-h2.sh up`: Upgrade
After upgrading, the server uses TLS and HTTP/2; or HTTP/1.1 + TLS if a
browser does not support `h2`.

- `dev-upgrade-h2.sh down`: Downgrade
The server uses HTTP/1.1, or HTTP/2 over TCP (`h2c`) if a browser
supports `h2c`.

`mod_php` will be disabled and another multiprocessing module
(`mpm_event`) will be used in Apache2. This is effective before
upgrading/downgrading.

### Other information?

- NGINX
  The NGINX server still serves WebSocket traffics with HTTP/1.1.

**Note that** most browsers could not trust WebSocket traffics with
self-signed certificates. If you are dealing with WebSocket related
features, there are some workarounds:
    - Copy the certs from VM and trust it on your host system; OR
    - Trust/Ignore the certificates on browsers; OR
    - Downgrade to HTTP/1.1 using `.setup/dev-upgrade-h2.sh down`.

  Trusting/ignoring certificates on browsers:
- For Chrome, start Chrome with `--ignore-certificate-errors` option.
    - For Firefox...
      1. trust the certificate when the warning pops up;
      2. type `https://localhost:8443/ws` and select trust again.

This will not impact the production as it is equipped with standard
certificates from the trusted CA.

- Performance Tuning, Production
  See documentations above.

---------

Co-authored-by: Shail Patel <shailpatel67@gmail.com>
Co-authored-by: Viane Matsibekker <117249183+04vmatsibekker@users.noreply.github.com>
Co-authored-by: Barb Cutler <bmcutler@users.noreply.github.com>
Co-authored-by: Chris Reed <55092742+cjreed121@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants