-
Notifications
You must be signed in to change notification settings - Fork 164
[TT-10496] extra docs for gRPC high availability #6462
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
base: master
Are you sure you want to change the base?
Conversation
|
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨No code suggestions found for the PR. |
✅ PS. Add to the end of url /docs/nightly
To edit notification comments on pull requests, go to your Netlify project configuration. |
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.
Questions:
- Does our gRPC client enable health checking, as shown in this example?
// Start HTTP server for health checks | ||
go func() { | ||
mux := http.NewServeMux() | ||
|
||
// Readiness probe endpoint | ||
mux.HandleFunc("/ready", func(w http.ResponseWriter, r *http.Request) { | ||
if atomic.LoadInt32(&isReady) == 1 { | ||
w.WriteHeader(http.StatusOK) | ||
w.Write([]byte("Ready")) | ||
} else { | ||
w.WriteHeader(http.StatusServiceUnavailable) | ||
w.Write([]byte("Not ready")) | ||
} | ||
}) | ||
|
||
// Liveness probe endpoint | ||
mux.HandleFunc("/health", func(w http.ResponseWriter, r *http.Request) { | ||
w.WriteHeader(http.StatusOK) | ||
w.Write([]byte("Healthy")) | ||
}) | ||
|
||
if err := http.ListenAndServe(HealthAddress, mux); err != nil { | ||
log.Fatalf("Failed to start health server: %v", err) | ||
} | ||
}() |
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.
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.
I agree that would be the most performant way but http is easier to debug. Maybe I could add another paragraph saying that for maximum performance we recommend grpc probes ?
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.
No, let's remove HTTP and stick to the native gRPC example
No, currently we don't support that but I guess we could in the future. |
User description
Added extra docs around gRPC high availability and DNS protocol for gRPC.
Preview Link
Checklist
New Contributors
master
.PR Type
Documentation
Description
Added detailed documentation on highly available gRPC servers in Kubernetes
Provided Go example for health checks and graceful shutdown
Included Kubernetes deployment YAML with probes for gRPC middleware
Documented DNS-based load balancing for gRPC in Tyk 5.8.2+
Changes walkthrough 📝
advance-config.md
Add gRPC high availability and DNS protocol documentation
tyk-docs/content/api-management/plugins/advance-config.md
servers in Kubernetes
shutdown
probes