# Does nginx have a Routing API?

**URL:** <https://www.ruby-forum.com/t/does-nginx-have-a-routing-api/244057>\
**Category:** NGINX\
**Created:** [February 12, 2016, 8:35pm UTC](https://www.ruby-forum.com/t/does-nginx-have-a-routing-api/244057 "2016-02-12T20:35:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sadaf\_N](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/858c86/32.png) [@Sadaf\_N](https://www.ruby-forum.com/u/Sadaf_N)\
**Post date:** [February 12, 2016, 8:35pm UTC](https://www.ruby-forum.com/t/does-nginx-have-a-routing-api/244057/1 "2016-02-12T20:35:29Z")

</div>

I am trying to see if nginx (OSS, not commercial) can be used not only  
as a  
load balancer, but as a network router/switch in the event that I need  
to  
shut my app down and redirect traffic to a CDN/static page, etc.

I was hoping to find a REST API that might allow me to configure routing  
rules on the fly but alas, I see nothing.

Does nginx provide this functionality out of the box? Or can I pair it  
with  
something that does? This would be a Java app it is balancing, and I see  
there is an nginx-clojure  
([GitHub - nginx-clojure/nginx-clojure: Nginx module for embedding Clojure or Java or Groovy programs, typically those Ring based handlers.](https://github.com/nginx-clojure/nginx-clojure))  
module. So perhaps I could expose a REST endpoint through Java (running  
on  
the nginx server) somehow…thoughts?

Posted at Nginx Forum:

> **[Does nginx have a Routing API?](https://forum.nginx.org/read.php?2,264500,264500#msg-264500)**
>
> I am trying to see if nginx (OSS, not commercial) can be used not only as a load balancer, but as a network router/switch in the event that I need to shut my app down and redirect traffic to a CDN/static page, etc. I was hoping to find a REST API...
