Skip to content

Sushi Gateway Architecture

Sushi Gateway’s architecture is designed for flexibility, modularity, and scalability. It provides a robust API gateway solution that can handle diverse workloads and use cases. Below, we explore the core components, deployment modes, and networking of Sushi Gateway.

Core Components

1. Sushi Proxy

The Sushi Proxy is the core component responsible for:

  • Routing: Directing requests to the appropriate upstream services based on defined configurations.
  • Load Balancing: Distributing requests across multiple service instances using strategies like round-robin.
  • Plugin Management: Executing configured plugins for authentication, rate limiting, and request transformation.

2. Sushi Manager

Sushi Manager is a web-based user interface that simplifies:

  • Configuration Management: Visualize and modify gateway configurations.
  • Monitoring: Track API usage and inspect logs in real-time.
  • Testing: Quickly test routes and plugins through the interactive UI.

Deployment Modes

Stateless Mode (dbless)

Stateless mode uses declarative configuration files and does not require a database. It is ideal for:

  • Testing and Development: Quickly prototype and validate configurations.
  • GitOps Workflows: Manage configurations using version-controlled files.

Stateful Mode (db)

Stateful mode persists configurations in a database and is suited for:

  • Production Deployments: Handle large-scale systems with dynamic configurations.
  • High Availability: Ensure data consistency and resilience.

TIP

Learn more about the differences between Stateless and Stateful modes in the Data Persistence Guide.

Plugins and Extensibility

Sushi Gateway adopts a modular approach with plugins to extend functionality. Some functionalities of plugins include:

  • Authenticate Requests: Support JWT, API keys, MTLS, and more.
  • Rate Limit Traffic: Control the number of requests per user or service.

Plugin Scopes

Plugins can be applied at different scopes, allowing fine-grained customizability:

ScopeDescription
GlobalApplies policies across all services.
ServiceApplies policies to specific backend services.
RouteTailors policies for individual API routes.

INFO

Read about supported plugins and their configurations in the Plugins Guide.

Networking and Ports

PortProtocolPurpose
8008HTTPExposes the API Gateway for client requests.
8443HTTPSProvides secure communication using TLS.
8081HTTPHosts the internal Admin API for managing and querying gateway state.
5173HTTPRuns the web-based UI for interacting with Sushi Gateway.

TIP

Ensure the appropriate ports are open in your firewall or networking settings for smooth operation.

Released under the MIT License.