diff --git a/app/_gateway_entities/target.md b/app/_gateway_entities/target.md index d6805be1..3c914964 100644 --- a/app/_gateway_entities/target.md +++ b/app/_gateway_entities/target.md @@ -1,6 +1,8 @@ --- title: Targets content_type: reference +description: A Target is an IP address/hostname with a port that identifies an instance of a backend service. + entities: - target @@ -11,7 +13,11 @@ tools: - deck - terraform -description: A target identifies a specific instance of an upstream service. +related_resources: + - text: Upstream entity + url: /gateway/entities/upstream/ + - text: Route entity + url: /gateway/entities/route/ schema: api: gateway/admin-ee @@ -19,13 +25,13 @@ schema: --- -## What is a target? +## What is a Target? -{{page.description}} +{{page.description}} Each [Upstream](/gateway/entities/upstream/) can have many Targets. Targets are used by Upstreams for [load balancing](https://docs.konghq.com/gateway/latest/how-kong-works/load-balancing/). For example, if you have an `example_upstream` Upstream, you can point it to two different Targets: `httpbin.konghq.com` and `httpbun.com`. This is so that if one of the servers (like `httpbin.konghq.com`) is unavailable, it automatically detects the problem and routes all traffic to the working server (`httpbun.com`). -## Use cases for targets +The following diagram illustrates how Targets are used by Upstreams for load balancing: -The following are examples of common use cases for targets: +{% include entities/upstreams-targets-diagram.md %} ## Schema diff --git a/app/_includes/components/entity_example/format/ui.md b/app/_includes/components/entity_example/format/ui.md index 4d9c97ae..2eff7e2b 100644 --- a/app/_includes/components/entity_example/format/ui.md +++ b/app/_includes/components/entity_example/format/ui.md @@ -42,6 +42,19 @@ The following creates a new service called **{{ include.presenter.data['name'] } 4. Configure your plugin. The configuration options will depend on which plugin you picked. 5. Click **Save**. {% when 'target' %} +The following creates a new Upstream and a Target with basic configuration: + +The following creates a new Upstream with basic configuration: + +1. In Kong Manager or Gateway Manager, Navigate to **Workspaces** > **Upstreams**. +1. Click **New Upstream**. +1. Enter a unique name for the Upstream. For example: `{{ include.presenter.data['name'] }}`. +1. Click **Save**. +1. From your Upstream, select the **Targets** tab. +1. Click **New Target**. +1. Enter an IP address/hostname and port in the **Target Address** field, for example: `{{ include.presenter.data['target'] }}` +1. Update the weight for example: `{{ include.presenter.data['weight'] }}`. +1. Click **Save**. {% when 'upstream' %} The following creates a new Upstream with basic configuration: