Skip to content

Commit

Permalink
Big picture.
Browse files Browse the repository at this point in the history
Signed-off-by: Mathieu Lecarme <mathieu.lecarme@af83.com>
  • Loading branch information
Mathieu Lecarme committed Jan 15, 2012
1 parent 680cc36 commit 7f3223f
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions examples/triangle/README.md
@@ -0,0 +1,34 @@
Triangle example
================

The front is a http server. Each web request is sent to a queue.
workers pick tasks from the queue and answer to the right http connection.

Big picture
-----------

```
redis
http +-------+ +-------+ lpoll +---------+
<------>| |------->| Queue |<-------| |
| Front | +-------+ | Workers |
| |<------------------------| |
+-------+ +---------+
```

Try it
------

In a first terminal:

node front.js

In a second terminal:

node worker.js & node worker.js & node worker.js & node worker.js

In a third terminal:

siege -c 100 -t 30s http://localhost:1337

0 comments on commit 7f3223f

Please sign in to comment.