How to prepare a C10K demo

322 views
Skip to first unread message

Afshin Mehrabani

unread,
May 5, 2013, 12:54:51 AM5/5/13
to nod...@googlegroups.com
Hello all,

I want to prepare a C10K demo in NodeJs but I don't have any idea how. Could someone say how can I prepare a C10K demo in NodeJs HTTP Server (or maybe with expressjs)

Thanks,
Afshin

Ben Noordhuis

unread,
May 5, 2013, 3:46:28 AM5/5/13
to nod...@googlegroups.com
What do you want to demo besides 10K concurrent clients? If you only
want to demonstrate that node.js can handle that many connections,
copy the example from the home page and hit it with `ab -k -c 10000 -n
<big number> <url>`.

Afshin Mehrabani

unread,
May 5, 2013, 5:25:09 AM5/5/13
to nod...@googlegroups.com
Actually I want to write a client to simulate this 10,000 concurrent clients. I saw this C10K demo in django: https://github.com/aaugustin/django-c10k-demo

And I want to do something like that. Is that possible via websocket?

Alex Kocharin

unread,
May 5, 2013, 5:30:56 AM5/5/13
to nod...@googlegroups.com
 
I'm not sure http library allows it, but you can always open 10k raw tcp sockets and write a request there at the same time... what do you need websocket for?
 
--
// alex
 
 
05.05.2013, 13:25, "Afshin Mehrabani" <afshi...@gmail.com>:
--
--
Job Board: http://jobs.nodejs.org/
Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nod...@googlegroups.com
To unsubscribe from this group, send email to
nodejs+un...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en
 
---
You received this message because you are subscribed to the Google Groups "nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Afshin Mehrabani

unread,
May 5, 2013, 5:33:27 AM5/5/13
to nod...@googlegroups.com, al...@kocharin.ru
Do you have sample of that? I'm newbie. 

In this example of C10K in Django, he used websocket for simulating this 10,000 clients: https://github.com/aaugustin/django-c10k-demo
So I think it's possible in NodeJs also.

Bruce Dou

unread,
May 5, 2013, 8:12:34 AM5/5/13
to nod...@googlegroups.com, al...@kocharin.ru
You can try this client https://github.com/doubaokun/node-ab
--
A decathlon Developer & programmer
http://blog.eood.cn/
Reply all
Reply to author
Forward
0 new messages