Wladimir Palant
d7be54bbb5
Add a dummy TLS implementation to be used as fallback
2024-06-11 23:49:09 +02:00
Yuchen Wu
31d7b63ed7
Add new_h1() back
...
This function turns out to be actually useful for testing and mocking
2024-06-07 15:42:30 -04:00
Yuchen Wu
8a8302cf7b
Respect the keepalive setting sent in HTTP client
...
Before this change, a HTTP client would only respect
the Connection header returned from the server.
Now, if the client sends "Connection: closed", it would not
keepalive regardless what the server returns.
2024-06-07 15:42:30 -04:00
Yuchen Wu
11863d27a2
Introduce HttpModules to pingora-proxy.
...
This feature allows to plug in 3rd party extensions with minimal code
required.
The downstream compression logic is now a module.
Add: a new early_request_filter API to fine tune the behavior of the modules.
Add: a few APIs to write the response with these modules enabled. This
should address issues like compression is not applied to custom
responses.
2024-06-07 15:42:30 -04:00
Yuchen Wu
53e696d1dd
Faster remove_header() call.
...
It saves one lookup when the header to remove is not in the map.
Micro-benchmark shows about 40% speedup.
2024-06-07 15:42:30 -04:00
Zaidoon Abd Al Hadi
e3c655b781
update CacheKey to allow overriding primary key hash
2024-06-07 15:42:30 -04:00
Kevin Guthrie
7c49ef4758
Add msrv (1.72) to build-check matrix
2024-06-07 15:27:38 -04:00
Yuchen Wu
216d8e9d92
Pin triomphe to keep our MSRV
2024-05-31 11:04:36 -07:00
Wladimir Palant
b7ac8a50fc
Fixes #231 - Remove Markdown code from the long CLI help
...
---
While at it, fix grammar in the description of the --daemon flag
Includes-commit: a8dee4e975
Includes-commit: f420f36c53
Replicated-from: https://github.com/cloudflare/pingora/pull/247
2024-05-31 11:04:36 -07:00
Alex Severin
d41231191c
finish todo
...
---
reafactor
Includes-commit: 41ca473605
Includes-commit: f5870a985c
Replicated-from: https://github.com/cloudflare/pingora/pull/215
2024-05-31 11:04:36 -07:00
Andrew Hauck
4579a780c6
get_tcp_info and get_recv_buf should return None for UDS
2024-05-31 11:04:36 -07:00
Yuchen Wu
fa071eb506
Refactor Service API: Arc is no longer needed for apps.
...
This change makes a bit cleaner to use the API. It also allows to
modify the application logic before starting the service.
2024-05-31 11:04:36 -07:00
Yuchen Wu
4019aa0819
Simplify vectored write API
...
Provide a write_vec_all() API so that users don't have to loop
themselves.
2024-05-31 11:04:36 -07:00
Yuchen Wu
ea1db2fb9d
Add read and write pending time info
...
These APIs show how much time a socket spends on waiting for data and
the time waiting for data to be sent. They are good indicators of
performance bottlenecks.
2024-05-31 11:04:36 -07:00
Andrew Hauck
47844a7ea4
Add ability to get TCP_INFO through SocketDigest, add get_recv_buf function
2024-05-31 11:04:36 -07:00
Yuchen Wu
2902dc5365
Redesign the API of HTTP module
...
Make it async and more natural.
2024-05-31 11:04:36 -07:00
Kevin Guthrie
479d9badbf
Addressing github #231 - Cleaning up cli-help text
2024-05-24 10:00:06 -07:00
Kevin Guthrie
9dee8e6775
Dropping the clap version to the most recent compatible with our rust 1.72
2024-05-24 10:00:06 -07:00
Wladimir Palant
795594db83
Fixes #235 - Replace unmaintained structopt crate by clap
...
---
Fixed formatting
Includes-commit: 05f9754166
Includes-commit: 29286c7e71
Replicated-from: https://github.com/cloudflare/pingora/pull/239
2024-05-24 10:00:06 -07:00
Andrew Hauck
6db86b6929
Add ability to set server side tcp keepalive
2024-05-24 10:00:06 -07:00
Yuchen Wu
6f4f4cc41e
Allow the lookup_duration to be read
2024-05-24 10:00:06 -07:00
Yuchen Wu
ac25f03e62
Track cache lookup time
2024-05-24 10:00:06 -07:00
Zaidoon Abd Al Hadi
026f483712
expose session to cache_hit_filter phase
2024-05-24 10:00:06 -07:00
Andrew Hauck
cd5134431c
Ignore write_response_header on upgraded websockets
2024-05-24 10:00:06 -07:00
Yuchen Wu
a40175412c
avoid a possible race condition when releasing h2 connections
...
It is possible that when two threads try to release streams of the same
h2 connection, one thread would register the connection in the in_use_pool
while the other register it in the idle_pool.
The solution is to put a lock so that the connection can only appear in
one pool at a time.
2024-05-24 10:00:06 -07:00
Yuchen Wu
840367359d
Don't panic when h2 fails to allocate a stream
...
There is still a bug but change to this to help debug.
2024-05-24 10:00:06 -07:00
Yuchen Wu
f38f3b9a38
Add request body filter
2024-05-24 10:00:06 -07:00
Yuchen Wu
34b2a35d7b
TCP fast open server side support.
...
Provide default and non_exhaustive for TcpSocketOptions to future proof
its changes.
Also fix an issue that TcpScoketOptions can't be used for IPv4 sockets
at all.
2024-05-17 14:16:31 -07:00
Daniel Dao
2272112c56
set SO_RCVBUF before connect
...
SO_RCVBUF needs to be set before connect otherwise tcp settings will
not be finalized correctly. And since autotuning is not engaged in this
case, the throughput will suffer.
2024-05-17 14:16:31 -07:00
Yuchen Wu
98af739147
Client side TCP fast open support
2024-05-17 14:16:31 -07:00
Edward Wang
0a6dabdd50
Add BasicPeer::new_uds constructor
2024-05-17 14:16:31 -07:00
Yuchen Wu
3dbdcc6b09
Release 0.2.0
2024-05-10 15:22:37 -07:00
Yuchen Wu
7507b69683
Fix clipper warning on Rust 1.78
2024-05-10 15:22:37 -07:00
Kevin Guthrie
1a6af266a0
cargo fmt
2024-05-10 15:22:37 -07:00
James Munns
880488987c
Add Service<HttpProxy<T>>
constructor for providing name
...
Includes-commit: 8727b2466f
Replicated-from: https://github.com/cloudflare/pingora/pull/218
2024-05-10 15:22:37 -07:00
Andrew Hauck
2625a1b42e
Add upstream_response_trailer_filter reference to user guide
2024-05-10 15:22:37 -07:00
ewang
cfb89c6eb5
Add purge_response callback
...
Allow generating custom responses to purge requests (requests to
invalidate or delete from the HTTP cache).
2024-05-10 15:22:37 -07:00
Benjamin Leggett
b493ac0c95
Make pop_closed
pub, to simplify DIY drains
...
Includes-commit: 069a792c91
Replicated-from: https://github.com/cloudflare/pingora/pull/209
Signed-off-by: Benjamin Leggett <benjamin.leggett@solo.io>
2024-05-10 15:22:37 -07:00
Andrew Hauck
6229cc555c
Always return HttpTask::Body on body done instead of HttpTask::done
2024-05-10 15:22:37 -07:00
Yuchen Wu
1b7d43207b
parse and send HTTP/1 reason phrase
...
This change allows customized HTTP1 reason phrase to be used and
proxied.
2024-05-10 15:22:37 -07:00
Alex Severin
4347ef4471
finish zip todo
...
Includes-commit: 68a9196642
Replicated-from: https://github.com/cloudflare/pingora/pull/214
2024-05-10 15:22:37 -07:00
Alex Severin
2a449ac305
unzip map items
...
Includes-commit: db64afd0a3
Replicated-from: https://github.com/cloudflare/pingora/pull/216
2024-05-10 15:22:37 -07:00
yaohuiming
42b0224129
Add async_cleanup() method to ServerApp trait
...
---
Refactor cleanup functions to use async/await
Includes-commit: 3cd52fee46
Includes-commit: 58946a8d58
Replicated-from: https://github.com/cloudflare/pingora/pull/193
2024-05-10 15:22:37 -07:00
Andrew Hauck
2501d4adb0
Fix non linux build
2024-04-26 12:31:57 -04:00
Johan Planchon
218dbdfd5d
Update zstd-safe to 7.1.0 and zstd to 0.13.1 in pingora-header-serde
...
Includes-commit: 0026a572a7
Replicated-from: https://github.com/cloudflare/pingora/pull/197
2024-04-26 12:31:57 -04:00
Kevin Guthrie
e19d8c817d
Splitting out the daemon group_id type for MacOs and FreeBsd
2024-04-26 12:31:57 -04:00
Yonas
5fde29f6fc
Fix build on FreeBSD.
...
Define `group_id` in the pingora-core's server daemon on FreeBSD.
---
Merge branch 'cloudflare:main' into yonas-~~~
Co-authored-by: Yonas Yanfa <yonas.y@gmail.com>
Includes-commit: 30ee1e8bd4
Includes-commit: df9f2da7bd
Replicated-from: https://github.com/cloudflare/pingora/pull/28
2024-04-26 12:31:57 -04:00
Andrew Hauck
a6bd816f16
Add support for downstream h2 trailers and add an upstream h2 response trailer filter
2024-04-26 12:31:57 -04:00
Yuchen Wu
93ad08ea3e
Add the ability to set TCP recv buf size
2024-04-26 12:31:57 -04:00
Shane Utt
586781a685
docs: add build requirements to README.md
...
Includes-commit: ba75f36b39
Replicated-from: https://github.com/cloudflare/pingora/pull/7
2024-04-26 12:31:57 -04:00