Skip to content

Add hyper support as a boot-time option #1646

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

Merged
merged 1 commit into from
Mar 7, 2019

Conversation

jtgeibel
Copy link
Member

@jtgeibel jtgeibel commented Mar 7, 2019

If the USE_HYPER environment variable is set then hyper is used as
the backend server. If the variable is not set, the default remains a
civet based server.

This has a trivial impact on build times and binary sizes, as hyper
is already pulled in (as a Client) on production via reqwest.

This will also aid in profiling performance differences, as backend
instances can be run in parallel in two terminals:

$ PORT=8888 cargo run --release --bin server
$ PORT=8889 USE_HYPER=1 cargo run --release --bin server

If the `USE_HYPER` environment variable is set then `hyper` is used as
the backend server.  If the variable is not set, the default remains a
`civet` based server.

This has a trivial impact on build times and binary sizes, as `hyper`
is already pulled in (as a `Client`) on production via `reqwest`.

This will also aid in profiling performance differences, as backend
instances can be run in parallel in two terminals:

```
$ PORT=8888 cargo run --release --bin server
$ PORT=8889 USE_HYPER=1 cargo run --release --bin server
```
@sgrif
Copy link
Contributor

sgrif commented Mar 7, 2019

@bors: r+

@bors
Copy link
Contributor

bors commented Mar 7, 2019

📌 Commit 914939b has been approved by sgrif

@bors
Copy link
Contributor

bors commented Mar 7, 2019

⌛ Testing commit 914939b with merge 4bed129...

bors added a commit that referenced this pull request Mar 7, 2019
Add `hyper` support as a boot-time option

If the `USE_HYPER` environment variable is set then `hyper` is used as
the backend server.  If the variable is not set, the default remains a
`civet` based server.

This has a trivial impact on build times and binary sizes, as `hyper`
is already pulled in (as a `Client`) on production via `reqwest`.

This will also aid in profiling performance differences, as backend
instances can be run in parallel in two terminals:

```
$ PORT=8888 cargo run --release --bin server
$ PORT=8889 USE_HYPER=1 cargo run --release --bin server
```
@bors
Copy link
Contributor

bors commented Mar 7, 2019

☀️ Test successful - checks-travis
Approved by: sgrif
Pushing 4bed129 to master...

@bors bors merged commit 914939b into rust-lang:master Mar 7, 2019
@jtgeibel jtgeibel deleted the conduit-hyper-round3 branch March 9, 2019 15:51
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.

3 participants