Creating UDP Route

This tutorial describes how to create a UDP route for a job.

Note that to create a UDP route, your cluster will need to have the UDP router component installed.


To deploy an app using the udp router.

1) Create an app using APC and disable route generation.

apc app create <appname> -dr

Disabling route generation (-dr) ensures that a default HTTP route is not auto-created.

2) Add the port your application is listening on.

apc app update <appname> --udp-port-add <portnum>

If the application is listening on the $UDP_PORT env variable, use port 0 and the port is selected by the system.

3) Add the UDP route.

Provide the public IP of the UDP router:

apc route add <endpoint (e.g.> --udp --add <appname> --port <portnum>

4) Start the application.

apc app start <appname>

5) You should now be able to send UDP traffic to your application at the route printed by APC.

For example:

echo "hello world" | nc -u 40000"