Skip to content

Commit

Permalink
fix critical services issue on pg follower restart (#8548)
Browse files Browse the repository at this point in the history
* fix critical services issue on pg follower restart. Directly send data to pg leader from pg-gateway

Signed-off-by: Vivek Shankar <vshankar@progress.com>

* added health check retry

Signed-off-by: Vivek Shankar <vshankar@progress.com>

* updated working patch health check config for provided services

Signed-off-by: Vivek Shankar <vshankar@progress.com>

* renamed folder

Signed-off-by: Vivek Shankar <vshankar@progress.com>

* review comments

Signed-off-by: punitmundra <pmundra@progress.com>

* fail timout added in es, changes port from 7432 to 5432

Signed-off-by: Vivek Shankar <vshankar@progress.com>

* added log in cs health hook

Signed-off-by: Vivek Shankar <vshankar@progress.com>

* path after upgrade

Signed-off-by: Vivek Shankar <vshankar@progress.com>

* added max conn configurable

Signed-off-by: Vivek Shankar <vshankar@progress.com>

* fix policy

Signed-off-by: Vivek Shankar <vshankar@progress.com>

* fix policy

Signed-off-by: Vivek Shankar <vshankar@progress.com>

* revert pg

Signed-off-by: Vivek Shankar <vshankar@progress.com>

---------

Signed-off-by: Vivek Shankar <vshankar@progress.com>
Signed-off-by: punitmundra <pmundra@progress.com>
Co-authored-by: punitmundra <pmundra@progress.com>
  • Loading branch information
vivekshankar1 and punitmundra authored Sep 13, 2024
1 parent c487d62 commit 34eb900
Show file tree
Hide file tree
Showing 27 changed files with 429 additions and 240 deletions.
4 changes: 4 additions & 0 deletions api/config/deployment/config_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ func NewConfigRequest() *ConfigRequest {
},
Svc: &ConfigRequest_V1_Service{
AdminUser: &ConfigRequest_V1_AdminUser{},
Health: &ConfigRequest_V1_Health{},
},
},
}
Expand All @@ -48,6 +49,9 @@ func DefaultConfigRequest() *ConfigRequest {
c.V1.Svc.ManifestCacheExpiry = w.String("60m")
c.V1.Svc.PackageCleanupMode = w.String("conservative")

c.V1.Svc.Health.HealthCheckInterval = w.Int32(30)
c.V1.Svc.Health.Services = []string{}

return c
}

Expand Down
282 changes: 186 additions & 96 deletions api/config/deployment/config_request.pb.go

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions api/config/deployment/config_request.proto
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,13 @@ message ConfigRequest {

google.protobuf.BoolValue enable_dev_monitoring = 15;
repeated string products = 16;

Health health = 17;
}

message Health {
google.protobuf.Int32Value health_check_interval = 1;
repeated string services = 2;
}

message AdminUser {
Expand Down
1 change: 1 addition & 0 deletions api/config/esgateway/config_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ func DefaultConfigRequest() *ConfigRequest {

c.V1.Sys.Ngx.Main.WorkerProcesses = w.Int32(4)
c.V1.Sys.Ngx.Main.MaxFails = w.Int32(10)
c.V1.Sys.Ngx.Main.FailTimeout = w.Int32(10)
// TODO(ssd) 2020-12-08: Enable automatic discovery of system
// resolvers once we are a bit more confident in the nginx
// module we are using to do dynamic resolution.
Expand Down
85 changes: 49 additions & 36 deletions api/config/esgateway/config_request.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions api/config/esgateway/config_request.proto
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ message ConfigRequest {
google.protobuf.Int32Value max_fails = 2;
reserved 3;
Resolvers resolvers = 4;
google.protobuf.Int32Value fail_timeout = 5;

message Resolvers {
google.protobuf.BoolValue enable_system_nameservers = 1;
Expand Down
1 change: 1 addition & 0 deletions api/config/pg_gateway/config_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ func DefaultConfigRequest() *ConfigRequest {
c.V1.Sys.Timeouts.Connect = w.Int32(5)
c.V1.Sys.Timeouts.Idle = w.Int32(43200)
c.V1.Sys.Resolvers.EnableSystemNameservers = w.Bool(false)
c.V1.Sys.MaxConnections = w.Int32(350)

return c
}
Expand Down
Loading

0 comments on commit 34eb900

Please sign in to comment.