[erlang-questions] Active mode and packet http

3 views
Skip to first unread message

Ingela Andin

unread,
Aug 17, 2010, 10:36:49 AM8/17/10
to Erlang
Hi!

I would like to make a quick survey to find out if there is anyone out
there that is
using active once or active true socket option together with the inet
option {packet, http | http_bin} .
If you are please drop me a line

Yaws and Mochiweb seems to use passive mode.

Regards Ingela Erlang/OTP team - Ericsson AB

________________________________________________________________
erlang-questions (at) erlang.org mailing list.
See http://www.erlang.org/faq.html
To unsubscribe; mailto:erlang-questio...@erlang.org

Roberto Ostinelli

unread,
Aug 17, 2010, 10:43:34 AM8/17/10
to Ingela Andin, Erlang
misultin uses {active, once} for headers, passive for html body, and
{active, true} for websockets.

http://code.google.com/p/misultin/

cheers,

r.


2010/8/17 Ingela Andin <ing...@erlang.org>:

--
-------------------------------------------------------------------
Roberto Ostinelli
CTO, WideTag Inc. - Realtime, Social, Green
widetag.com
skype: rostinelli
twitter: ostinelli
mobile: +39 335 6 100 22 6

Bob Ippolito

unread,
Aug 17, 2010, 10:53:46 AM8/17/10
to Ingela Andin, Erlang
On Tue, Aug 17, 2010 at 10:36 PM, Ingela Andin <ing...@erlang.org> wrote:
> Hi!
>
> I would like to make a quick survey to find out if there is anyone out
> there that is
> using active once or active true socket option together with the  inet
> option {packet, http | http_bin} .
> If you are please drop me a line
>
> Yaws and Mochiweb seems to use passive mode.

I've played with {active, once}, it seems like it might be a little
bit faster than passive. A future version of mochiweb might use it, at
least for the request line and headers, similar to what misultin does.

-bob

Steve Vinoski

unread,
Aug 17, 2010, 11:35:00 AM8/17/10
to Ingela Andin, Bob Ippolito, Erlang
On Tue, Aug 17, 2010 at 10:53 AM, Bob Ippolito <b...@redivi.com> wrote:
> On Tue, Aug 17, 2010 at 10:36 PM, Ingela Andin <ing...@erlang.org> wrote:
>> Hi!
>>
>> I would like to make a quick survey to find out if there is anyone out
>> there that is
>> using active once or active true socket option together with the  inet
>> option {packet, http | http_bin} .
>> If you are please drop me a line
>>
>> Yaws and Mochiweb seems to use passive mode.
>
> I've played with {active, once}, it seems like it might be a little
> bit faster than passive. A future version of mochiweb might use it, at
> least for the request line and headers, similar to what misultin does.

Bob, I think you're right -- we just did some measurements last week
that appeared to show that {active, once} is indeed a bit faster than
passive mode.

Ingela, I use {active, once} for HTTP headers in the system I work on.

--steve

Roberto Ostinelli

unread,
Aug 17, 2010, 12:00:47 PM8/17/10
to Steve Vinoski, Ingela Andin, Bob Ippolito, Erlang
> Bob, I think you're right -- we just did some measurements last week
> that appeared to show that {active, once} is indeed a bit faster than
> passive mode.

definitely. according to my benches, it was around 8-12% faster on R13B01.

r.

Tony Rogvall

unread,
Aug 17, 2010, 6:34:05 PM8/17/10
to Ingela Andin, Erlang
Of course I use the active once when ever possible (including http)
This is how you can multiplex in one process.

Why do you ask?

/Tony

Steve Davis

unread,
Aug 17, 2010, 9:16:58 PM8/17/10
to erlang-q...@erlang.org
I'm experimenting with {active, true}, because I perceive it to be
more "otp", and perhaps just to see whether the predicted doom/fear of
flooding actually happens in practice on an http server connection...

...No load/profiling stats as yet. Probably a month or two before I'll
get to those.

/s

Steve Davis

unread,
Aug 17, 2010, 9:19:08 PM8/17/10
to erlang-q...@erlang.org
However, I'm using binary/raw mode and parsing the http requests - so
may not be of interest.

On Aug 17, 8:16 pm, Steve Davis <steven.charles.da...@gmail.com>
wrote:
> I'm experimenting with {active, true}....

Reply all
Reply to author
Forward
0 new messages