From 97c943284300066a65ceae5cd88c303c016302d2 Mon Sep 17 00:00:00 2001 From: cskh Date: Mon, 28 Nov 2022 17:48:43 -0500 Subject: [PATCH] fix(peering): increase the gRPC limit to 8MB (#15503) * fix(peering): increase the gRPC limit to 50MB * changelog * update gRPC limit to 8MB --- .changelog/15503.txt | 3 +++ agent/consul/leader_peering.go | 2 +- agent/grpc-internal/client.go | 4 +++- website/content/docs/connect/cluster-peering/index.mdx | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 .changelog/15503.txt diff --git a/.changelog/15503.txt b/.changelog/15503.txt new file mode 100644 index 0000000000..05997fad59 --- /dev/null +++ b/.changelog/15503.txt @@ -0,0 +1,3 @@ +```release-note:bug +peering: fix the limit of replication gRPC message; set to 8MB +``` diff --git a/agent/consul/leader_peering.go b/agent/consul/leader_peering.go index 602e311df8..4e76c26d31 100644 --- a/agent/consul/leader_peering.go +++ b/agent/consul/leader_peering.go @@ -360,7 +360,7 @@ func (s *Server) establishStream(ctx context.Context, // send keepalive pings even if there is no active streams PermitWithoutStream: true, }), - grpc.WithDefaultCallOptions(grpc.MaxCallSendMsgSize(50 * 1024 * 1024)), + grpc.WithDefaultCallOptions(grpc.MaxCallSendMsgSize(8*1024*1024), grpc.MaxCallRecvMsgSize(8*1024*1024)), } logger.Trace("dialing peer", "addr", addr) diff --git a/agent/grpc-internal/client.go b/agent/grpc-internal/client.go index dfeb3dbb20..18596eec71 100644 --- a/agent/grpc-internal/client.go +++ b/agent/grpc-internal/client.go @@ -148,7 +148,9 @@ func (c *ClientConnPool) dial(datacenter string, serverType string) (*grpc.Clien grpc.WithKeepaliveParams(keepalive.ClientParameters{ Time: 30 * time.Second, Timeout: 10 * time.Second, - })) + }), + grpc.WithDefaultCallOptions(grpc.MaxCallSendMsgSize(8*1024*1024), grpc.MaxCallRecvMsgSize(8*1024*1024)), + ) if err != nil { return nil, err } diff --git a/website/content/docs/connect/cluster-peering/index.mdx b/website/content/docs/connect/cluster-peering/index.mdx index 3fbd30b716..184598c546 100644 --- a/website/content/docs/connect/cluster-peering/index.mdx +++ b/website/content/docs/connect/cluster-peering/index.mdx @@ -46,7 +46,7 @@ Regardless of whether you connect your clusters through WAN federation or cluste Consider the following technical constraints: -- Services with node, instance, and check definitions totaling more than 50MB cannot be exported to a peer. +- Services with node, instance, and check definitions totaling more than 8MB cannot be exported to a peer. - Two admin partitions in the same datacenter cannot be peered. Use [`exported-services`](/docs/connect/config-entries/exported-services#exporting-services-to-peered-clusters) directly. - The `consul intention` CLI command is not supported. To manage intentions that specify services in peered clusters, use [configuration entries](/docs/connect/config-entries/service-intentions). - Accessing key/value stores across peers is not supported.