Добавить X-Instance-Id, задержку drain при SIGTERM и отдельный запуск миграций
This commit is contained in:
@@ -13,6 +13,15 @@ import (
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
// instance names the process that answered, so a client behind the load
|
||||
// balancer can tell the replicas apart.
|
||||
func instance(id string) gin.HandlerFunc {
|
||||
return func(c *gin.Context) {
|
||||
c.Writer.Header().Set("X-Instance-Id", id)
|
||||
c.Next()
|
||||
}
|
||||
}
|
||||
|
||||
// requestID assigns a fresh identifier to every request.
|
||||
//
|
||||
// An incoming X-Request-Id is deliberately not reused. This service is
|
||||
|
||||
Reference in New Issue
Block a user