Concepts: vRouter, vSwitch, vLB (Wave B)

Last updated 2 min read
Report issue

Overview#

Wave B introduces critical virtual networking primitives for GritivaCore, enhancing the capabilities established in Wave A. This document outlines the vRouter, vSwitch, and vLB, detailing their definitions, use cases, features, and comparisons. These components are essential for advanced networking scenarios, particularly in multi-VNet topologies and high availability (HA) application patterns.

vRouter#

Definition#

The vRouter provides Layer 3 routing between Virtual Networks (VNets) with policy-based routing (PBR) capabilities.

Use Cases#

  • Connecting multiple VNets for intercommunication.
  • Implementing policy-based routing for traffic management.

Features#

  • Supports BGP-like advertising.
  • Enables advanced routing configurations.

vSwitch#

Definition#

The vSwitch creates a Layer 2 broadcast domain across scopes, primarily for legacy applications requiring ARP discovery.

Use Cases#

  • Legacy applications that depend on VLAN-style networking.

Features#

  • Facilitates ARP discovery across VNets.

vLB#

Definition#

The vLB is a Layer 4/Layer 7 load balancer that includes health checks, sticky sessions, and failover capabilities similar to Cloudflare.

Use Cases#

  • Distributing traffic across multiple application backends.
  • Ensuring high availability and reliability for applications.

Features#

  • Health checks for backend services.
  • Sticky sessions for user sessions.

Comparison#

FeaturevRoutervSwitchvLB
LayerL3L2L4/L7
Use CaseMulti-VNet routingLegacy app supportLoad balancing
Policy-BasedYesNoYes

ASCII Topology#

TEXT
  VNet A        VNet B
    |             |
    |             |
  +---+       +---+
  | vR|-------| vR|
  +---+       +---+
    |             |
    |             |
  +-----------------+
  |       vLB      |
  +-----------------+
    |             |
  +---+       +---+
  | App|       | App|
  +---+       +---+

Lifecycle Commands#

To create and manage the networking primitives, use the following commands:

BASH
gritivactl vrouter create edge --connect vnet-a,vnet-b
gritivactl vlb create app-lb --backends scope1:8080,scope2:8080
gritivactl vswitch create legacy-vlan --vnet vnet-a

Render Revision Idempotency#

Wave B introduces a render_revision counter for reconciliation, allowing for retryable partial failures. This ensures that operations can be safely retried without unintended side effects.

Smoke Test Status#

Wave B has been shipped, but the full smoke-test suite is pending. For updates, refer to the GitHub issue.

Open Questions

Open Questions
Please clarify the following: - What specific technical specifications are required for each component? - Are there any additional diagrams needed beyond the ASCII topology?