Skip to main content

Getting started with pCDN

The pCDN handles API traffic, acting as a gateway and routing to various destinations, depending on your configurations. This tutorial will walk you through configuring your first route, and other tasks like:

  • Validating the route
  • Creating an upstream object for use in routing.

Prerequisites

  • A Stargate instance. Contact the Macrometa team for your Stargate server and login details.

Step 1: Create a route

A route acts as the gateway/entry point for incoming requests and forwards them to an upstream target address.

To create a route:

  1. Login to your Stargate instance. stargate

  2. Navigate to Routes from the Dashboard. routes

  3. Click +Create . Follow these four-step process to configure a route:

    1. Define API request: Enter a name for your route. Other fields in this step are optional. Click Next. config-route config-route The path /* matches against all available paths from the host address. config-route

    2. Define API Backend server: Here, you define your upstream configuration. This is the target address for your route. Enter a Target host and port and leave every other field as it is. Our upstream uses the round robin algorithm and nodes. You can add more nodes to help with load balancing. Click Next config-route-step-2 You can enable health check and configure settings for your health check. route-health

    3. Plugin Config: Here, you can enable your desired plugins. The platform offers numerous plugins catering to areas like authentication, security, traffic control, serverless, and observability. plugins To enable a plugin, navigate to the desired plugin and toggle the slider bar to enable/disable the plugin. Some plugins require configuration, while others, like basic auth, do not.

    4. Preview: This step allows you go through your configuration from steps 1-3. Click Submit.

Step 2: Validate the Route