-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updates cloud endpoint forwarding guide #1108
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
8fda03f
to
9b10693
Compare
9b10693
to
5464922
Compare
5464922
to
98545b2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this! Just a few suggested changes I'd like to get your input on.
Have you tested the examples? I have to step away from the PC but will test them when I get back
... | ||
} | ||
``` | ||
To follow this guide, you will need a computer with `ngrok` installed. [You can download ngrok here.](https://download.ngrok.com). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To follow this guide, you will need a computer with `ngrok` installed. [You can download ngrok here.](https://download.ngrok.com). | |
To follow this guide, you will need a computer with `ngrok` installed. [You can download ngrok here.](https://download.ngrok.com) |
Removed extra period
} | ||
BODY | ||
``` | ||
Visit https://dashboard.ngrok.com/domains and reserve a domain. This will be how your end users access your endpoint in the browser. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Visit https://dashboard.ngrok.com/domains and reserve a domain. This will be how your end users access your endpoint in the browser. | |
Reserve a domain [in the dashboard](https://dashboard.ngrok.com/domains). This will allow your end users access your endpoint in the browser. |
Mostly language cleanup for simplification. Is a browser the only way a user can access an ngrok endpoint with a reserved domain? If not, we should drop "in the browser" from the end of the sentence in my opinion
... | ||
} | ||
``` | ||
Once you've reserved a domain, visit https://dashboard.ngrok.com/endpoints to create a public endpoint linked to that domain |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Come to think of it, maybe we should combine these two steps into one called "Reserve a domain and a cloud endpoint" since they're very simple. It could look like this:
## **Step 1** – Reserve a domain and create a cloud endpoint
You can complete these steps in the ngrok dashboard.
1. [Reserve a domain](https://dashboard.ngrok.com/domains). This will allow your end users access your endpoint in the browser.
2. [Create a public endpoint](https://dashboard.ngrok.com/endpoints) linked to your reserved domain.
Could be nice to add a sentence to the end of the 2nd item explaining the point of creating a public endpoint
handle incoming traffic. This guide will showcase one of the simplest | ||
and most common use cases: forwarding traffic to other endpoints | ||
(the internal endpoint we created in Step 1) via the forward action. | ||
Cloud endpoints require a traffic policy so they know how to handle incoming traffic. This guide will showcase one of the simplest and most common use cases: forwarding traffic to a private endpoint via the `forward-internal` action. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cloud endpoints require a traffic policy so they know how to handle incoming traffic. This guide will showcase one of the simplest and most common use cases: forwarding traffic to a private endpoint via the `forward-internal` action. | |
Cloud endpoints require [traffic policies](/traffic-policy/) to manage incoming traffic. The following is an example of a traffic policy that forwards traffic to a private endpoint via the [`forward-internal`](/traffic-policy/actions/forward-internal/) action. |
Simplification
Now we can create a ngrok Cloud Endpoint that points to our | ||
newly created internal endpoint. Cloud Endpoints can be created | ||
via the API or ngrok dashboard. | ||
At this point, you have a public endpoint with a domain and a traffic policy routing to the URL we defined in our traffic policy above, `https://the-internal-endpoint.internal`. But that URL doesn't exist on the public internet; we need to start an agent session so that requests to our public endpoint will be routed to our internal endpoint, served by the ngrok agent. So, locally, start an agent session with: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At this point, you have a public endpoint with a domain and a traffic policy routing to the URL we defined in our traffic policy above, `https://the-internal-endpoint.internal`. But that URL doesn't exist on the public internet; we need to start an agent session so that requests to our public endpoint will be routed to our internal endpoint, served by the ngrok agent. So, locally, start an agent session with: | |
Finally, to accept requests routed to your internal endpoint, you must start an ngrok agent locally on the machine or resource you want to use with the following command. |
I heavily simplified this, but let me know if I've made it inaccurate. I appreciate that the wording was deliberate to make what's happening clearer, but I personally found it harder to process than a more streamlined explanation
``` | ||
|
||
## Conclusion | ||
|
||
And we're done! You've successfully created a cloud endpoint that can be accessed from the URL you reserved: `${NGROK_SUBDOMAIN}.ngrok.app` | ||
The cloud endpoint will refer to its traffic policy and forward traffic to our internal endpoint. The internal endpoint finally exposes the local port on which it was created on in Step 1. | ||
And you're done! You've successfully created a cloud endpoint that can be accessed from the URL you reserved. The cloud endpoint will refer to its traffic policy and forward traffic to our internal endpoint. The internal endpoint finally exposes the local port on which it was created on in Step 1. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I personally think we should cut this section, as it's just repitition
|
||
- Replace NGROK_SUBDOMAIN with the value used in step 2. | ||
## **Step 5** — See your endpoint in action |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would make this a separate section called "Load balancing internal endpoints". It's not really a step in the guide, as the user is already done. Also, the previous step is already labeled Step 5
preview lives here: https://ngrok-docs-git-jen-clep-routing-update-ngrok-dev.vercel.app/docs/guides/other-guides/forwarding-and-load-balancing-with-cloud-endpoints/