Modifying the limit size of DCS gRPC inbound message (#11892)

This commit is contained in:
ooi22 2024-02-23 08:54:45 +08:00 committed by GitHub
parent 0f7844278a
commit 8737725624
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 5 additions and 0 deletions

View File

@ -54,6 +54,7 @@
* Mock `/api/v1/status/buildinfo` for PromQL API.
* Fix table exists check in the JDBC Storage Plugin.
* Fix day-based table rolling time range strategy in JDBC storage.
* Add `maxInboundMessageSize (SW_DCS_MAX_INBOUND_MESSAGE_SIZE)` configuration to change the max inbound message size of DCS.
#### UI

View File

@ -281,6 +281,7 @@ The Configuration Vocabulary lists all available configurations provided by `app
| - | - | port | DCS server binding port. | SW_DCS_SERVER_PORT | 80 |
| - | - | clusterName | Cluster name when reading the latest configuration from DSC server. | SW_DCS_CLUSTER_NAME | SkyWalking |
| - | - | period | The period of reading data from DSC server by the OAP (in seconds). | SW_DCS_PERIOD | 20 |
| - | - | maxInboundMessageSize | The max inbound message size of gRPC. | SW_DCS_MAX_INBOUND_MESSAGE_SIZE | 4194304 |
| - | apollo | apolloMeta | `apollo.meta` in Apollo. | SW_CONFIG_APOLLO | http://localhost:8080 |
| - | - | apolloCluster | `apollo.cluster` in Apollo. | SW_CONFIG_APOLLO_CLUSTER | default |
| - | - | apolloEnv | `env` in Apollo. | SW_CONFIG_APOLLO_ENV | - |

View File

@ -44,6 +44,7 @@ public class GRPCConfigWatcherRegister extends FetchingConfigWatcherRegister {
stub = ConfigurationServiceGrpc.newBlockingStub(
NettyChannelBuilder.forAddress(settings.getHost(), settings.getPort())
.usePlaintext()
.maxInboundMessageSize(settings.getMaxInboundMessageSize())
.build());
}

View File

@ -30,6 +30,7 @@ public class RemoteEndpointSettings extends ModuleConfig {
private String clusterName = "default";
// Sync configuration per 60 seconds.
private int period = 60;
private int maxInboundMessageSize = 4194304;
@Override
public String toString() {

View File

@ -485,6 +485,7 @@ configuration:
port: ${SW_DCS_SERVER_PORT:80}
clusterName: ${SW_DCS_CLUSTER_NAME:SkyWalking}
period: ${SW_DCS_PERIOD:20}
maxInboundMessageSize: ${SW_DCS_MAX_INBOUND_MESSAGE_SIZE:4194304}
apollo:
apolloMeta: ${SW_CONFIG_APOLLO:http://localhost:8080}
apolloCluster: ${SW_CONFIG_APOLLO_CLUSTER:default}