The Getting Started tutorials are contributed by API7.ai.
Apache APISIX provides flexible gateway management capabilities based on routes, where routing paths and targets are defined for requests.
This tutorial guides you on how to create a route and validate it. You will complete the following steps:
- Create a route with a sample upstream that points to httpbin.org.
- Use cURL to send a test request to see how APISIX proxies and forwards the request.
#What is a Route
A route is a routing path to upstream targets. In Apache APISIX, routes are responsible for matching client's requests based on defined rules, loading and executing the corresponding plugins, as well as forwarding requests to the specified upstream services.
In APISIX, a simple route can be set up with a path-matching URI and a corresponding upstream address.
#What is an Upstream
An upstream is a set of target nodes with the same work. It defines a virtual host abstraction that performs load balancing on a given set of service nodes according to the configured rules.
- Complete Get APISIX to install APISIX.
#Create a Route
In this section, you will create a route that forwards client requests to httpbin.org, a public HTTP request and response service.
The following command creates a route, which should forward all requests sent to
http://127.0.0.1:9080/ip to httpbin.org/ip:
curl -i "http://127.0.0.1:9180/apisix/admin/routes" -X PUT -d '
You will receive an
HTTP/1.1 201 OK response if the route was created successfully.
The expected response is similar to the following:
This tutorial creates a route with only one target node. In the next tutorial, you will learn how to configure load balancing with multiple target nodes.