Skip to main content

Getting started with pCDN

As an API gateway, the pCDN uses routes to route all incoming traffic to different destinations depending on your upstream configuration. Routes are the gateway/entry point for all these requests, This guide will walk you through the following tasks to get you started using pCDN:

  • Configuring a route
  • Validating the route

Prerequisite(s)

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

Step 1: Configuring a route

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

You can test the validity of your route by sending a request to the configured route.

Next steps

Now we have our route configured, let's illustrate load balancing using upstream nodes.