-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[TT-13139] Request times out in some cases when sending input via http inputs #6601
base: master
Are you sure you want to change the base?
Conversation
…StreamingAPIMultipleClients_Input_HTTPServer
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
API Changes --- prev.txt 2024-10-03 12:25:14.192088526 +0000
+++ current.txt 2024-10-03 12:25:08.273121874 +0000
@@ -7563,6 +7563,12 @@
ErrOAuthClientDeleted = "oauth.client_deleted"
)
const (
+ // ExtensionTykStreaming is the oas extension for tyk streaming
+ ExtensionTykStreaming = "x-tyk-streaming"
+ StreamGCInterval = 1 * time.Minute
+ StreamInactiveLimit = 10 * time.Minute
+)
+const (
ResetQuota string = "resetQuota"
CertificateRemoved string = "CertificateRemoved"
CertificateAdded string = "CertificateAdded"
@@ -7614,10 +7620,6 @@
The name for event handlers as defined in the API Definition JSON/BSON
format
-const (
- // ExtensionTykStreaming is the oas extension for tyk streaming
- ExtensionTykStreaming = "x-tyk-streaming"
-)
const ListDetailed = "detailed"
const LoopScheme = "tyk"
const OIDPREFIX = "openid" |
PR Code Suggestions ✨Explore these optional code suggestions:
|
Quality Gate failedFailed conditions See analysis details on SonarCloud Catch issues before they fail your Quality Gate with our IDE extension SonarLint |
dryRun: r == nil, | ||
streamsConfig := s.getStreamsConfig(r) | ||
configJSON, _ := json.Marshal(streamsConfig) | ||
cacheKey := fmt.Sprintf("%x", md5.Sum(configJSON)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
100% should be replaced by smth like sha256 or similar. md5 is too weak (I know it was part of orig implementation, but still..)
User description
TT-13139
Cherry-picked stream caching feature from this branch: #6538
Two new integration tests have been added to test
input http -> output http
scenario. See this issue for the details: https://tyktech.atlassian.net/browse/TT-13139Closing the previous one: #6592
PR Type
Enhancement, Tests
Description
StreamingMiddleware
to manage inactive streams and improve performance.Changes walkthrough 📝
mw_streaming.go
Implement stream caching and garbage collection in StreamingMiddleware
gateway/mw_streaming.go
mw_streaming_test.go
Add integration tests for HTTP server streaming scenarios
gateway/mw_streaming_test.go