mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 08:05:49 -06:00
[GH-ISSUE #2188] An option to enable TCP KeepAlived for HTTP? #1743
Labels
No labels
In Progress
WIP
WaitingForInfo
bug
doc
duplicate
easy
enhancement
future
help wanted
invalid
lifecycle/stale
need-issue-template
need-usage-help
no plan
proposal
pull-request
question
todo
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/frp#1743
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @LauTrond on GitHub (Jan 13, 2021).
Original GitHub issue: https://github.com/fatedier/frp/issues/2188
The solution you want
Offer an option of type=http, enable TCP KeepAlived for HTTP
Alternatives considered
I found frps make every HTTP request with a single connection, even if both HTTP client and server support
Connection: keep-aliveThen I look into vhost/http.go, looks like the vhost disable keep-alived for all requests:
How to implement this function
Application scenarios of this function
We want FRP works faster of HTTP, don't we?
@fatedier commented on GitHub (Jan 13, 2021):
It can't be supported now.
Go http package reuse connections by host. However, frp can route request by host and location(url path). If
DisableKeepAlivesis false, it will cause mistakes.Leave this issue open here and we can consider how to achieve it later.
@LauTrond commented on GitHub (Jan 14, 2021):
Thanks. Sounds like we need multiple *ReverseProxy for multiple destination?
@fatedier commented on GitHub (Jan 18, 2021):
@LauTrond I have submited a PR https://github.com/fatedier/frp/pull/2199 about to fix this issue, you can try it now and help find if it has bug.