• Stars
    star
    283
  • Rank 146,066 (Top 3 %)
  • Language
    Perl
  • License
    Other
  • Created almost 15 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Starman is a high-performance preforking Perl PSGI web server

NAME

Starman - High-performance preforking PSGI/Plack web server

SYNOPSIS

# Run app.psgi with the default settings
> starman

# run with Server::Starter
> start_server --port 127.0.0.1:80 -- starman --workers 32 myapp.psgi

# UNIX domain sockets
> starman --listen /tmp/starman.sock

Read more options and configurations by running `perldoc starman` (lower-case s).

DESCRIPTION

Starman is a PSGI perl web server that has unique features such as:

  • High Performance

    Uses the fast XS/C HTTP header parser

  • Preforking

    Spawns workers preforked like most high performance UNIX servers do. Starman also reaps dead children and automatically restarts the worker pool.

  • Signals

    Supports HUP for graceful worker restarts, and TTIN/TTOU to dynamically increase or decrease the number of worker processes, as well as QUIT to gracefully shutdown the worker processes.

  • Superdaemon aware

    Supports Server::Starter for hot deploy and graceful restarts.

  • Multiple interfaces and UNIX Domain Socket support

    Able to listen on multiple interfaces including UNIX sockets.

  • Small memory footprint

    Preloading the applications with --preload-app command line option enables copy-on-write friendly memory management. Also, the minimum memory usage Starman requires for the master process is 7MB and children (workers) is less than 3.0MB.

  • PSGI compatible

    Can run any PSGI applications and frameworks

  • HTTP/1.1 support

    Supports chunked requests and responses, keep-alive and pipeline requests.

  • UNIX only

    This server does not support Win32.

PERFORMANCE

Here's a simple benchmark using Hello.psgi.

-- server: Starman (workers=10)
Requests per second:    6849.16 [#/sec] (mean)
-- server: Twiggy
Requests per second:    3911.78 [#/sec] (mean)
-- server: AnyEvent::HTTPD
Requests per second:    2738.49 [#/sec] (mean)
-- server: HTTP::Server::PSGI
Requests per second:    2218.16 [#/sec] (mean)
-- server: HTTP::Server::PSGI (workers=10)
Requests per second:    2792.99 [#/sec] (mean)
-- server: HTTP::Server::Simple
Requests per second:    1435.50 [#/sec] (mean)
-- server: Corona
Requests per second:    2332.00 [#/sec] (mean)
-- server: POE
Requests per second:    503.59 [#/sec] (mean)

This benchmark was processed with ab -c 10 -t 1 -k on MacBook Pro 13" late 2009 model on Mac OS X 10.6.2 with perl 5.10.0. YMMV.

NOTES

Because Starman runs as a preforking model, it is not recommended to serve the requests directly from the internet, especially when slow requesting clients are taken into consideration. It is suggested to put Starman workers behind the frontend servers such as nginx, and use HTTP proxy with TCP or UNIX sockets.

PSGI EXTENSIONS

psgix.informational

Starman exposes a callback named psgix.informational that can be used for sending an informational response. The callback accepts two arguments, the first argument being the status code and the second being an arrayref of the headers to be sent. Example below sends an 103 Early Hints response before processing the request to build a final response.

sub {
    my $env = shift;

    $env->{'psgix.informational'}->( 103, [
        "Link" => "</style.css>; rel=preload"
    ] );

    my $rest = ...
    $resp;
}

AUTHOR

Tatsuhiko Miyagawa [email protected]

Andy Grundman wrote Catalyst::Engine::HTTP::Prefork, which this module is heavily based on.

Kazuho Oku wrote Net::Server::SS::PreFork that makes it easy to add Server::Starter support to this software.

The psgix.informational callback comes from Starlet by Kazuho Oku.

COPYRIGHT

Tatsuhiko Miyagawa, 2010-

LICENSE

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

Plack Catalyst::Engine::HTTP::Prefork Net::Server::PreFork

More Repositories

1

cpanminus

cpanminus - get, unpack, build and install modules from CPAN
Perl
734
star
2

github-growler

Growl github updates
Perl
215
star
3

hubot-cron

Crontab like scheduling messages for Hubot
CoffeeScript
214
star
4

plagger

Pluggable RSS/Atom aggregator
Perl
184
star
5

Tabelog-HonestStars

Make Tabelog Stars more honest
JavaScript
184
star
6

plack-handbook

166
star
7

Tatsumaki

Plack-based nonblocking Web framework for IO-bound delayed response, server push (streaming) and long-poll comet
JavaScript
136
star
8

Carmel

CPAN Artifact Repository Manager
Perl
134
star
9

remedie

perl based pluggable media center application
Perl
121
star
10

Twiggy

AnyEvent based non-blocking PSGI web server (like Thin)
JavaScript
104
star
11

web-scraper

Perl web scraping toolkit
Perl
100
star
12

heroku-buildpack-perl

Heroku buildpack to run Perl/PSGI apps using Starman HTTP server
Shell
98
star
13

hubot-standup

Agile style standup bot with hubot, ala tender
CoffeeScript
95
star
14

cpanfile

Yet another way to declare CPAN dependencies
Perl
81
star
15

faraday-cookie_jar

Client-side cookie management for Faraday
Ruby
75
star
16

ripdiko

Rip radiko programs
Ruby
62
star
17

rack-vcr

Rack middleware to capture incoming HTTP requests/responses with VCR
Ruby
56
star
18

Dist-Milla

Opinionated and Unobtrusive distribution builder
Perl
42
star
19

AnyEvent-Redis

Asynchronous Redis client
Perl
41
star
20

AnyEvent-Twitter-Stream

AnyEvent based Twitter stream consumer
Perl
39
star
21

Corona

Coro based high-performance, asynchronous PSGI web server
Perl
39
star
22

plenv-contrib

Perl
38
star
23

Filesys-Notify-Simple

Simple and dumb file system watcher
Perl
32
star
24

xml-atom

XML::Atom perl module
Perl
30
star
25

fatbundle

Fat bundle for your Ruby script
Ruby
29
star
26

docker-plenv-vanilla

Shell
29
star
27

plack-dispatching-samples

Examples of Plack dispatcher using various CPAN modules
Perl
28
star
28

gistp

Yet another gist command line tool (like gisty)
Perl
28
star
29

Webhook-Growler

Receives Web hooks over Reverse HTTP and notifies via Growl
Perl
28
star
30

HTTPx-Weblet

the Request/Response objects formerly known as the-old-Plack::Request
Perl
26
star
31

fastpass

Tiny, XS free, standalone and preforking FastCGI daemon for PSGI
Perl
26
star
32

Plack-Middleware-Debug

Debug panel middleware for Plack
Perl
26
star
33

Catalyst-Engine-PSGI

PSGI engine for Catalyst
Perl
25
star
34

resque-top

top for Resque
Ruby
25
star
35

TheSchwartz-Web

Web UI to list and control TheSchwartz jobs
JavaScript
24
star
36

MT-PubSubHubbub

PubSubHubbub plugin for Movable Type
Perl
23
star
37

Plack-Middleware-InteractiveDebugger

Interactive on-browser debugger for Plack ala Werkzeug
Perl
23
star
38

daily_digest

Daily Digest for Pocket (with Readability, calibre and IFTTT)
Ruby
23
star
39

Hash-MultiValue

Hash with multiple values per key, inspired by MultiDict.py of WebOb
Perl
22
star
40

plackperl.org

plackperl.org website files
HTML
21
star
41

Subfeedr

Open PubSubHubbub Hub that does polling for you, built on top of Tatsumaki and AnyEvent
Perl
21
star
42

dircaster

Generate RSS 2.0 podcast out of directory with *.mp3s
Ruby
20
star
43

perl-app-builder

Turns your perl script into .app using Platypus
Perl
19
star
44

hubot-lingr

CoffeeScript
19
star
45

asana_digest

Asana digest to Hipchat
Ruby
18
star
46

cpanf

Query and install CPAN modules realtime from the fresh mirror
Perl
18
star
47

catalyst-view-json

Not maintained: see https://github.com/shadowcat-mst/catalyst-view-json
Perl
18
star
48

Data-Section-Simple

read data from DATA for inline templates and more
Perl
17
star
49

jquery-fitimage

jQuery plugin to fit images while keeping the width/height ratio
JavaScript
16
star
50

Net-Twitter-OAuth

Net::Twitter with OAuth-based authentication
Perl
16
star
51

Fakehose

Fake Twitter streaming API server
Perl
16
star
52

yapcasia2015

HTML
15
star
53

Piglet

This is an incomplete project - DO NOT USE IT
Perl
15
star
54

Plack-App-PAR

Run .par as a PSGI application
Perl
15
star
55

cpanmetadb

CPAN metadata DB on Google AppEngine
Python
15
star
56

forkprove

Forking prove that allows you to preload modules with -M
Perl
14
star
57

dayone_import_tweets

Simple ruby script to import tweets into @dayoneapp
Ruby
13
star
58

google-contacts-gravatar

Import avatar photos from Gravatar to Google Contacts
Perl
13
star
59

www-nicovideo-download

Download videos from nicovideo.jp
Perl
13
star
60

yelp-bookmarks-vcards

Export Yelp bookmarks to vCard
Perl
12
star
61

cpan-module-bootstrap

Shell
12
star
62

HTTP-Tinyish

HTTP::Tiny compatible wrappers for LWP, curl, wget
Perl
12
star
63

module-install-repository

Module::Install plugin to auto-set repository URL
Perl
12
star
64

Sunaba

Plack/PSGI wrapper for dankogai's lleval sandbox
Perl
12
star
65

CGI-PSGI

Enable PSGI in your CGI.pm aware apps
Perl
12
star
66

Devel-StackTrace-AsHTML

Display stacktrace in HTML
HTML
11
star
67

cpan-timeline

Gives you a dashboard listing your friends activities on CPAN
Perl
11
star
68

HTTP-Server-Simple-PSGI

Semi dependency free PSGI web server
Perl
11
star
69

AnyEvent-ReverseHTTP

reversehttp client using AnyEvent
Perl
11
star
70

Perlbal-Plugin-PSGI

Perlbal plugin to run PSGI applications
Perl
10
star
71

test-synopsis

Test your code in SYNOPSIS
Perl
10
star
72

theschwartz-simple

Lightweight TheSchwartz job dispatcher using plain DBI
Perl
10
star
73

AnyEvent-DBI-Abstract

AnyEvent::DBI + SQL::Abstract
Perl
10
star
74

Acme-Test-VW

Makes your tests always pass under CI
Perl
10
star
75

geo-coder-google

Geo::Coder::Google
Perl
9
star
76

perldocjp-site

Perl
9
star
77

Module-Install-CPANfile

Include dependencies from cpanfile to replace META files
Perl
9
star
78

Plack-Middleware-File-Sass

PSGI middleware for Sass templates
Perl
9
star
79

hubot-webhook

Generic webhook plugin for Hubot
CoffeeScript
9
star
80

cpan-realtime-bot

Bot behind friendfeed.com/cpan
Perl
8
star
81

cpan-command-repo

Adds a new 'repo' command to CPAN shell
Perl
8
star
82

Plack-Middleware-REPL

REPL shell when your PSGI application raises exceptions
Perl
8
star
83

cpan-listchanges

List changes for CPAN modules
Perl
8
star
84

btbattery

Get BatteryPercent of your all BlueTooth devices
Ruby
8
star
85

Mac-Spotlight

CPAN Mac::Spotlight maint repo
C
8
star
86

cpan-mini-growl

Growl mirrored updates with minicpan
Perl
8
star
87

File-Spotlight

List files from Smart Folder by reading .savedSearch files
Perl
7
star
88

XML-Liberal

Patch XML
Perl
7
star
89

CGI-Compile

Compile .cgi script into a sub
Perl
7
star
90

AnyEvent-FriendFeed-Realtime

Subscribe to FriendFeed real-time updates
Perl
7
star
91

LWP-Protocol-PSGI

hijack LWP stack with your own PSGI application
Perl
7
star
92

HTML-Selector-XPath

Perl
7
star
93

Net-DNSSD

XS binding for dns_sd.h DNS Service Discovery (aka Bonjour)
C
7
star
94

Date-Japanese-Era

Perl
7
star
95

CPAN-Any

Install Perl modules using any CPAN clients
Perl
7
star
96

camp

stuff
Perl
7
star
97

Plack-Middleware-Hoptoad

Send application errors to Hoptoad
Perl
7
star
98

php-session

reads and writes PHP4 session files
Perl
7
star
99

App-PAUSE-Comaint

Make someone comaint of your module on PAUSE
Perl
7
star
100

nightflight

yakan-hiko.com β†’ Gmail β†’ Mailgun β†’ Heroku β†’ IFTTT
Ruby
7
star