mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
Got it actually working with workers and a remote router. Boom.
This commit is contained in:
26
README.md
26
README.md
@@ -1,15 +1,25 @@
|
||||
|
||||
|
||||
## 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.
|
||||
|
||||
## Todo
|
||||
|
||||
This is just a simple prototype. To get to production would need:
|
||||
|
||||
- Routing table in central storage (mongo or IronCache) so all routers can write to it and read to get updates.
|
||||
- Update routing table from central store every X minutes.
|
||||
- Remove failed routes and start new workers if it failed.
|
||||
- Remove failed routes and start new workers if it failed.
|
||||
- Expire routes after 55 minutes or so.
|
||||
- Ability to start new workers if none are running.
|
||||
- Ability to always keep a minimum number running at all times, like at least one (or not if on free account?).
|
||||
- Ability to start new workers based on some auto scaling scheme.
|
||||
- Authentication (same as always).
|
||||
|
||||
|
||||
## Testing
|
||||
|
||||
- start helloserver.go
|
||||
@@ -17,10 +27,10 @@ This is just a simple prototype. To get to production would need:
|
||||
- ruby worker.rb a couple times
|
||||
- ruby client.rb
|
||||
|
||||
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. The endpoint should only be cached for 55 minutes or so.
|
||||
## Testing for reals
|
||||
|
||||
- start router.go on remote server (there's a test project on SD already)
|
||||
- iron_worker upload app_worker
|
||||
- iron_worker queue app_worker
|
||||
- ruby client.rb
|
||||
- BOOM!
|
||||
|
||||
Reference in New Issue
Block a user