Joining or Running a Router Node¶
Router nodes play a crucial role in the HyperBEAM network by directing incoming HTTP requests to appropriate worker nodes capable of handling the requested computation or data retrieval. They act as intelligent load balancers and entry points into the AO ecosystem.
Advanced Topic
Configuring and running a production-grade router involves considerations beyond the scope of this introductory guide, including network topology, security, high availability, and performance tuning.
What is a Router?¶
In HyperBEAM, the dev_router
module (and associated logic) implements routing functionality. A node configured as a router typically:
- Receives external HTTP requests (HyperPATH calls).
- Parses the request path to determine the target process, device, and desired operation.
- Consults its routing table or logic to select an appropriate downstream worker node (which might be itself or another node).
- Forwards the request to the selected worker.
- Receives the response from the worker.
- Returns the response to the original client.
Routers often maintain information about the capabilities and load of worker nodes they know about.
Using Routers as a Client
To use a router as a client, simply make HyperPATH requests to the router's URL: https://dev-router.forward.computer/<process_id>~<device>/<key>...
. The router will automatically route your request to an appropriate worker node.
Node Registration Process¶
Coming soon...
Further Exploration¶
- Examine the
dev_router.erl
source code for detailed implementation. - Review the
scripts/dynamic-router.lua
for router-side logic. - Review the available configuration options in
hb_opts.erl
related to routing (routes
, strategies, etc.). - Consult community channels for best practices on deploying production routers. -->