| # SPDX-License-Identifier: Apache-2.0 |
| |
| //#defaults |
| pekko.grpc { |
| # Server-side configuration for gRPC services |
| server { |
| # Adaptive compression: messages smaller than this threshold (in bytes) |
| # are sent uncompressed, while larger messages are compressed with gzip. |
| # This avoids the CPU overhead of gzip for small messages where the |
| # bandwidth savings are negligible. |
| # Set to 0 to always compress (every message goes through gzip). |
| # Set to a very large value (e.g. 2147483647) to effectively disable compression. |
| compression-threshold = 1024 |
| } |
| |
| client."*" { |
| # netty or pekko-http (experimental) |
| backend = "netty" |
| |
| # Host to use if service-discovery-mechanism is set to static or grpc-dns |
| host = "" |
| |
| service-discovery { |
| mechanism = "static" |
| # Service name to use if a service-discovery.mechanism other than static or grpc-dns |
| service-name = "" |
| # See https://pekko.apache.org/docs/pekko-management/current/discovery/index.html for meanings for each mechanism |
| # if blank then not passed to the lookup |
| port-name = "" |
| protocol = "" |
| |
| # timeout for service discovery resolving |
| resolve-timeout = 1s |
| } |
| |
| # port to use if service-discovery-mechanism is static or service discovery does not return a port |
| port = 0 |
| |
| # Experimental in grpc-java https://github.com/grpc/grpc-java/issues/1771 |
| # pick_first or round_robin |
| load-balancing-policy = "" |
| |
| deadline = infinite |
| override-authority = "" |
| user-agent = "" |
| # Location on the classpath of CA PEM to trust |
| trusted = "" |
| use-tls = true |
| # SSL provider to use: |
| # leave empty to auto-detect, or configure 'jdk' or 'openssl'. |
| ssl-provider = "" |
| |
| # TODO: Enforce HTTP/2 TLS restrictions: https://tools.ietf.org/html/draft-ietf-httpbis-http2-17#section-9.2 |
| |
| # The number of times to try connecting before giving up. |
| # '-1': means retry indefinitely, '0' is invalid, '1' means fail |
| # after the first failed attempt. |
| # When load balancing we don't count individual connection |
| # failures, so in that case any value larger than '1' is also |
| # interpreted as retrying 'indefinitely'. |
| connection-attempts = 20 |
| |
| # Service discovery mechanism to use. The default is to use a static host |
| # and port that will be resolved via DNS. |
| # Any of the mechanisms described in https://pekko.apache.org/docs/pekko-management/current/discovery/index.html can be used |
| # including Kubernetes, Consul, AWS API |
| } |
| } |
| //#defaults |