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:
Login to your Stargate instance.
Navigate to Routes from the Dashboard.
Click +Create . Follow these four-step process to configure a route:
Define API request: Enter a name for your route. Other fields in this step are optional. Click Next. The path
/*
matches against all available paths from the host address.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 You can enable health check and configure settings for your health check.
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. 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.
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.