Skip to content
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

Why is the default value of the SDK client grpc "MaxSendMsgSize" inconsistent with the server grpc "MaxRecvMsgSize"? #6819

Open
smile-yi opened this issue Nov 15, 2024 · 0 comments

Comments

@smile-yi
Copy link

smile-yi commented Nov 15, 2024

The server grpc "MaxRecvMsgSize" iuses the default value of 4M and is not rewritten, but the client sdk grpc "MaxSendMsgSize" is rewritten to 128M. What is the reason for this?

server:

func NewService(
	server *grpc.Server,
	serviceConfig *configs.Config,
	visibilityMgr manager.VisibilityManager,
	handler *Handler,
	logger log.Logger,
	grpcListener net.Listener,
	membershipMonitor membership.Monitor,
	metricsHandler metrics.Handler,
	healthServer *health.Server,
) *Service {
	return &Service{
		server:            server,
		handler:           handler,
		visibilityManager: visibilityMgr,
		config:            serviceConfig,
		logger:            logger,
		grpcListener:      grpcListener,
		membershipMonitor: membershipMonitor,
		metricsHandler:    metricsHandler,
		healthServer:      healthServer,
	}
}

client:

defaultMaxPayloadSize = 128 * mb
...
opts = append(opts, securityOptions...)
opts = append(opts, grpc.WithDefaultCallOptions(grpc.MaxCallSendMsgSize(maxPayloadSize)))
opts = append(opts, grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(maxPayloadSize)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant