GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Twiggy(3) User Contributed Perl Documentation Twiggy(3)

Twiggy - AnyEvent HTTP server for PSGI

  twiggy --listen :8080

See "twiggy -h" for more details.

  use Twiggy::Server;
  my $server = Twiggy::Server->new(
      host => $host,
      port => $port,
  );
  $server->register_service($app);
  AE::cv->recv;

Twiggy is a lightweight and fast HTTP server with unique features such as:

Can run any PSGI applications. Fully supports psgi.nonblocking and psgi.streaming interfaces.
This server uses AnyEvent and runs in a non-blocking event loop, so it's best to run event-driven web applications that runs I/O bound jobs or delayed responses such as long-poll, WebSocket or streaming content (server push).

This software used to be called Plack::Server::AnyEvent but was renamed to Twiggy.

Uses XS/C based HTTP header parser for the best performance. (optional, install the HTTP::Parser::XS module to enable it; see also Plack::HTTPParser for more information).
The memory required to run twiggy is 6MB and it can serve more than 4500 req/s with a single process on Perl 5.10 with MacBook Pro 13" late 2009.
Supports Server::Starter for hot deploy and graceful restarts.

To use it, instead of the usual:

    plackup --server Twiggy --port 8111 app.psgi
    

install Server::Starter and use:

    start_server --port 8111 -- plackup --server Twiggy app.psgi
    

The following environment variables are supported.

Set to true to enable debug messages from Twiggy.

This module is licensed under the same terms as Perl itself.

Tatsuhiko Miyagawa

Tokuhiro Matsuno

Yuval Kogman

Hideki Yamamura

Daisuke Maki

Plack AnyEvent Tatsumaki

2021-01-21 perl v5.40.2

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.