|
@@ -217,6 +217,11 @@ WebServerServiceConfig WebServerService::loadConfig(const std::filesystem::path&
|
|
|
auto strategy_str = cfg.getOr<std::string>("runners.load_balancing", "least-connections");
|
|
auto strategy_str = cfg.getOr<std::string>("runners.load_balancing", "least-connections");
|
|
|
config.load_balancer_config.strategy =
|
|
config.load_balancer_config.strategy =
|
|
|
runners::loadBalancingStrategyFromString(strategy_str);
|
|
runners::loadBalancingStrategyFromString(strategy_str);
|
|
|
|
|
+ // Every webserver -> runner gRPC channel is sized off this, not a
|
|
|
|
|
+ // separate knob - see the comment on LoadBalancerConfig for why
|
|
|
|
|
+ // server.max_upload_mb (already loaded above) is the right source of
|
|
|
|
|
+ // truth rather than a second config key that could drift from it.
|
|
|
|
|
+ config.load_balancer_config.max_message_size_mb = config.max_upload_mb;
|
|
|
|
|
|
|
|
// JWT config
|
|
// JWT config
|
|
|
config.jwt_config.secret = cfg.getOr<std::string>("auth.jwt_secret",
|
|
config.jwt_config.secret = cfg.getOr<std::string>("auth.jwt_secret",
|
|
@@ -625,7 +630,7 @@ void WebServerService::reconcileOrphanedExecutions(const std::string& runner_id,
|
|
|
// runner knows which those are.
|
|
// runner knows which those are.
|
|
|
std::unordered_set<std::string> still_running;
|
|
std::unordered_set<std::string> still_running;
|
|
|
{
|
|
{
|
|
|
- auto channel = ::grpc::CreateChannel(address, ::grpc::InsecureChannelCredentials());
|
|
|
|
|
|
|
+ auto channel = load_balancer_->createChannel(address);
|
|
|
auto stub = proto::RunnerService::NewStub(channel);
|
|
auto stub = proto::RunnerService::NewStub(channel);
|
|
|
|
|
|
|
|
proto::ListActiveExecutionsRequest request;
|
|
proto::ListActiveExecutionsRequest request;
|
|
@@ -740,7 +745,7 @@ void WebServerService::runErrorWorkflow(const std::string& failed_workflow_id,
|
|
|
trigger_data["error"] = error_message;
|
|
trigger_data["error"] = error_message;
|
|
|
trigger_data["failedAt"] = common::TimeUtils::nowMs();
|
|
trigger_data["failedAt"] = common::TimeUtils::nowMs();
|
|
|
|
|
|
|
|
- auto channel = ::grpc::CreateChannel(runner->address, ::grpc::InsecureChannelCredentials());
|
|
|
|
|
|
|
+ auto channel = load_balancer_->createChannel(runner->address);
|
|
|
auto stub = proto::RunnerService::NewStub(channel);
|
|
auto stub = proto::RunnerService::NewStub(channel);
|
|
|
|
|
|
|
|
proto::ExecuteWorkflowRequest request;
|
|
proto::ExecuteWorkflowRequest request;
|
|
@@ -779,7 +784,7 @@ void WebServerService::executeScheduledWorkflow(const std::string& workflow_id,
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// Create gRPC channel and stub
|
|
// Create gRPC channel and stub
|
|
|
- auto channel = ::grpc::CreateChannel(runner->address, ::grpc::InsecureChannelCredentials());
|
|
|
|
|
|
|
+ auto channel = load_balancer_->createChannel(runner->address);
|
|
|
auto stub = proto::RunnerService::NewStub(channel);
|
|
auto stub = proto::RunnerService::NewStub(channel);
|
|
|
|
|
|
|
|
// Prepare request
|
|
// Prepare request
|