Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vilicvane/http2-auto-window-size
https://github.com/vilicvane/http2-auto-window-size
Last synced: 20 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/vilicvane/http2-auto-window-size
- Owner: vilicvane
- License: mit
- Created: 2023-12-11T09:42:35.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2023-12-19T16:48:41.000Z (about 1 year ago)
- Last Synced: 2024-11-30T15:41:56.664Z (23 days ago)
- Language: TypeScript
- Size: 39.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![NPM version](https://img.shields.io/npm/v/http2-auto-window-size?color=%23cb3837&style=flat-square)](https://www.npmjs.com/package/http2-auto-window-size)
[![Repository package.json version](https://img.shields.io/github/package-json/v/vilicvane/http2-auto-window-size?color=%230969da&label=repo&style=flat-square)](./package.json)
[![MIT License](https://img.shields.io/badge/license-MIT-999999?style=flat-square)](./LICENSE)
[![Discord](https://img.shields.io/badge/chat-discord-5662f6?style=flat-square)](https://discord.gg/wEVn2qcf8h)# http2-auto-window-size
Set HTTP/2 window size automatically based on estimated bandwidth and ping duration (RTT).
## Strategy
1. tolerable latency -> increase window size if bandwidth is high.
2. intolerable latency -> reduce window size if bandwidth is low.## Installation
```sh
npm install http2-auto-window-size
```## Usage
```js
import {setupAutoWindowSize} from 'http2-auto-window-size';server.on('session', session => setupAutoWindowSize(session));
```## License
MIT License.