/plushcap/analysis/ngrok/ngrok-post-traffic-policy-devenv

Create a Traffic Policy ‘devenv’ with custom responses to build rules faster

What's this blog post about?

The ngrok Traffic Policy module allows developers to create flexible and expressive rules for controlling traffic and configuring complex routing topologies. To make it easier to experiment with and learn about these rules, ngrok introduces a custom-response action that can be used to return hardcoded responses from the ngrok network without requiring backends or upstream services. This allows developers to quickly test and validate their Traffic Policy rules in a simple environment. By using this custom response as a terminating rule, masquerading as a functional upstream service and connected ngrok agent, developers can develop and test additional rules at will. The custom-response action can be used for various purposes, such as returning custom HTML maintenance pages or testing load balancing scenarios with random integers and custom responses. When ready to take the developed Traffic Policy rules into production, they can be replaced with real actions, allowing for more advanced features like JWT validation, rate limiting, and internal endpoint routing.

Company
Ngrok

Date published
Nov. 12, 2024

Author(s)
Joel Hans

Word count
886

Language
English

Hacker News points
None found.


By Matt Makai. 2021-2024.