Files
fn-serverless/README.md
2015-07-22 00:01:54 -07:00

1.5 KiB

What's going on?

  • worker.rb connects to router and adds routes.
  • client.rb connects to router which checks the routing table, proxies the request to one of the destinations and returns the response.

The idea here is that IronWorker backend can tell the router that it started a process and to start routing requests.

Usage

iron worker upload --name hello-sinatra --host YOURHOST treeder/hello-sinatra

Then hit the url:

http://router.iron.io/?rhost=YOURHOST

Todo

This is just a simple prototype. To get to production would need:

  • Ability to start new workers based on some auto scaling scheme.
  • Authentication (same as always).

Testing for reals on staging

1) Deploy router

Using DockerJockey:

dj run --on aws -i --name router -v "$(pwd)":/app -w /app -p 80:8080 treeder/golang-ubuntu:1.3.3on14.04 ./router

2) Update DNS

Update DNS entry router.iron.io to point to the newly launched server after dj deploy.

Or SimpleDeployer:

Deploying to production

  • just deploy as normal from SD project
  • use routertest.irondns.info for host