← Back to Tutorial Chapter 1 of 8
1 2 3 4 5 6 7 8
🚪 Chapter 1

Gateway Application

Understanding the OpenFaaS Gateway - the control plane that orchestrates all serverless function operations.

Control Plane Gateway Architecture Function Orchestration

🚪 What is the OpenFaaS Gateway?

The OpenFaaS Gateway is the central control plane of the OpenFaaS architecture. It acts as the entry point for all incoming requests and orchestrates the execution of serverless functions.

Key Responsibilities:

  • Request routing and load balancing
  • Function lifecycle management
  • Authentication and authorization
  • Metrics collection and monitoring

🎯 Why is the Gateway the Control Plane?

The Gateway serves as the control plane because it makes all critical decisions about how requests are processed, which functions to invoke, and how to manage the overall system state.

Centralized Decision Making

All routing, scaling, and resource allocation decisions flow through the Gateway, ensuring consistent behavior across the system.

State Management

The Gateway maintains the current state of all functions, their health, and availability across the cluster.

🏗️ Gateway Architecture Overview

The Gateway is built as a modular, extensible system that can be customized for different deployment scenarios and requirements.

🏗️

Gateway Components

🔌

HTTP Server

Handles incoming requests

🛡️

Middleware Chain

Request processing pipeline

⚙️

Provider Interface

Kubernetes integration

💻 Code Structure

The Gateway is implemented in Go and follows a clean, modular architecture that makes it easy to understand and extend.

// Main Gateway entry point
func main() {
// Initialize configuration
config := gateway.NewConfig()

// Setup HTTP server
server := gateway.NewServer(config)

// Start the gateway
server.Start()
}

➡️ What's Next?

Now that you understand what the Gateway is and why it's the control plane, let's explore how it's configured in the next chapter.