Hello PerlMonks,

I find very interesting to develop a flexible and powerful forward HTTP proxy server in Perl. I imagine that is possible to write a HTTP proxy server to support 400-1000 requests/second.
For example the very used proxy Squid use one non-blocking socket with a big select() poll. For my intention I tend to use only pre-forking or polling (select, epoll, kqueue), due to easy development. I’m not clear which technique is better suited. Which CPAN modules are suitable? Which performance can I expect? Do I need a blocking or a non-blocking socket? How scale?

I have tested some modules: forks, AnyEvent, EV, IO::Socket, IO::Async, IO::Select, IO::Poll, HTTP::Daemon, HTTP:Proxy, Net::Server, LWP::UserAgent, Furl and other, but I need a direction.

Google can’t help my much; one running proxy server using pre-forking was published by Randal L. Schwart (http://www.stonehenge.com/merlyn/WebTechniques/col34.html) 15 years ago.

Best regards

Josef


In reply to Develop a forward HTTP proxy server by josef

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.