|
15 | 15 | syntax = "proto3";
|
16 | 16 |
|
17 | 17 | import "google/api/field_behavior.proto";
|
| 18 | +import "networking/v1alpha3/destination_rule.proto"; |
18 | 19 | import "networking/v1alpha3/gateway.proto";
|
19 | 20 | import "networking/v1alpha3/virtual_service.proto";
|
20 | 21 |
|
@@ -479,6 +480,82 @@ import "networking/v1alpha3/virtual_service.proto";
|
479 | 480 | // ```
|
480 | 481 | // {{</tab>}}
|
481 | 482 | // {{</tabset>}}
|
| 483 | +// |
| 484 | +// In addition to configuring traffic capture and how traffic is forwarded to the app, |
| 485 | +// it's possible to control inbound connection pool settings. By default, Istio pushes |
| 486 | +// connection pool settings from `DestinationRules` to both clients (for outbound |
| 487 | +// connections to the service) as well as servers (for inbound connections to a service |
| 488 | +// instance). Using the `InboundConnectionPool` and per-port `ConnectionPool` settings |
| 489 | +// in a `Sidecar` allow you to control those connection pools for the server separately |
| 490 | +// from the settings pushed to all clients. |
| 491 | +// |
| 492 | +// {{<tabset category-name="example">}} |
| 493 | +// {{<tab name="v1alpha3" category-value="v1alpha3">}} |
| 494 | +// ```yaml |
| 495 | +// apiVersion: networking.istio.io/v1alpha3 |
| 496 | +// kind: Sidecar |
| 497 | +// metadata: |
| 498 | +// name: connection-pool-settings |
| 499 | +// namespace: prod-us1 |
| 500 | +// spec: |
| 501 | +// workloadSelector: |
| 502 | +// labels: |
| 503 | +// app: productpage |
| 504 | +// inboundConnectionPool: |
| 505 | +// http: |
| 506 | +// http1MaxPendingRequests: 1024 |
| 507 | +// http2MaxRequests: 1024 |
| 508 | +// maxRequestsPerConnection: 1024 |
| 509 | +// maxRetries: 100 |
| 510 | +// ingress: |
| 511 | +// - port: |
| 512 | +// number: 80 |
| 513 | +// protocol: HTTP |
| 514 | +// name: somename |
| 515 | +// connectionPool: |
| 516 | +// http: |
| 517 | +// http1MaxPendingRequests: 1024 |
| 518 | +// http2MaxRequests: 1024 |
| 519 | +// maxRequestsPerConnection: 1024 |
| 520 | +// maxRetries: 100 |
| 521 | +// tcp: |
| 522 | +// maxConnections: 100 |
| 523 | +// ``` |
| 524 | +// {{</tab>}} |
| 525 | +// |
| 526 | +// {{<tab name="v1beta1" category-value="v1beta1">}} |
| 527 | +// ```yaml |
| 528 | +// apiVersion: networking.istio.io/v1beta1 |
| 529 | +// kind: Sidecar |
| 530 | +// metadata: |
| 531 | +// name: connection-pool-settings |
| 532 | +// namespace: prod-us1 |
| 533 | +// spec: |
| 534 | +// workloadSelector: |
| 535 | +// labels: |
| 536 | +// app: productpage |
| 537 | +// inboundConnectionPool: |
| 538 | +// http: |
| 539 | +// http1MaxPendingRequests: 1024 |
| 540 | +// http2MaxRequests: 1024 |
| 541 | +// maxRequestsPerConnection: 1024 |
| 542 | +// maxRetries: 100 |
| 543 | +// ingress: |
| 544 | +// - port: |
| 545 | +// number: 80 |
| 546 | +// protocol: HTTP |
| 547 | +// name: somename |
| 548 | +// connectionPool: |
| 549 | +// http: |
| 550 | +// http1MaxPendingRequests: 1024 |
| 551 | +// http2MaxRequests: 1024 |
| 552 | +// maxRequestsPerConnection: 1024 |
| 553 | +// maxRetries: 100 |
| 554 | +// tcp: |
| 555 | +// maxConnections: 100 |
| 556 | +// ``` |
| 557 | +// {{</tab>}} |
| 558 | +// {{</tabset>}} |
482 | 559 | package istio.networking.v1alpha3;
|
483 | 560 |
|
484 | 561 | option go_package = "istio.io/api/networking/v1alpha3";
|
@@ -528,6 +605,32 @@ message Sidecar {
|
528 | 605 | // detected defaults from the namespace-wide or the global default Sidecar.
|
529 | 606 | repeated IstioEgressListener egress = 3;
|
530 | 607 |
|
| 608 | + // Settings controlling the volume of connections Envoy will accept from the network. |
| 609 | + // This default will apply for all inbound listeners and can be overridden per-port |
| 610 | + // in the `Ingress` field. This configuration mirrors the `DestinationRule`'s |
| 611 | + // [`connectionPool`](https://istio.io/latest/docs/reference/config/networking/destination-rule/#ConnectionPoolSettings) field. |
| 612 | + // |
| 613 | + // By default, Istio applies a service's `DestinationRule` to client sidecars |
| 614 | + // for outbound traffic directed at the service -- the usual case folks think |
| 615 | + // of when configuring a `DestinationRule` -- but also to the server's inbound |
| 616 | + // sidecar. The `Sidecar`'s connection pool configures the server's inbound |
| 617 | + // sidecar directly, so its settings can be different than clients'. This is |
| 618 | + // valuable, for example, when you have many clients calling few servers: a |
| 619 | + // `DestinationRule` can limit the concurrency of any single client, while |
| 620 | + // the `Sidecar` allows you to configure much higher concurrency on the server |
| 621 | + // side. |
| 622 | + // |
| 623 | + // Connection pool settings for a server's inbound sidecar are configured in the |
| 624 | + // following precedence, highest to lowest: |
| 625 | + // - per-port `ConnectionPool` from the `Sidecar` |
| 626 | + // - top level `InboundConnectionPool` from the `Sidecar` |
| 627 | + // - per-port `TrafficPolicy.ConnectionPool` from the `DestinationRule` |
| 628 | + // - top level `TrafficPolicy.ConnectionPool` from the `DestinationRule` |
| 629 | + // - default connection pool settings (essentially unlimited) |
| 630 | + // |
| 631 | + // In every case, the connection pool settings are overriden, not merged. |
| 632 | + ConnectionPoolSettings inbound_connection_pool = 7; |
| 633 | + |
531 | 634 | // Configuration for the outbound traffic policy. If your
|
532 | 635 | // application uses one or more external services that are not known
|
533 | 636 | // apriori, setting the policy to `ALLOW_ANY` will cause the
|
@@ -576,6 +679,15 @@ message IstioIngressListener {
|
576 | 679 | // sidecar for requests originating from outside the mesh.
|
577 | 680 | // Currently supports only SIMPLE and MUTUAL TLS modes.
|
578 | 681 | ServerTLSSettings tls = 7;
|
| 682 | + |
| 683 | + // Settings controlling the volume of connections Envoy will accept from the network. |
| 684 | + // This setting overrides the top-level default `inboundConnectionPool` to configure |
| 685 | + // specific settings for this port. This configuration mirrors the `DestinationRule`'s |
| 686 | + // [`PortTrafficPolicy.connectionPool`](https://istio.io/latest/docs/reference/config/networking/destination-rule/#TrafficPolicy-PortTrafficPolicy) field. |
| 687 | + // This port level connection pool has the highest precedence in configuration, |
| 688 | + // overriding both the `Sidecar`'s top level `InboundConnectionPool` as well as any |
| 689 | + // connection pooling settings from the `DestinationRule`. |
| 690 | + ConnectionPoolSettings connection_pool = 8; |
579 | 691 | }
|
580 | 692 |
|
581 | 693 | // `IstioEgressListener` specifies the properties of an outbound traffic
|
|
0 commit comments