meinheld

Software screenshot:
meinheld
Podrobnosti Software:
Verze: 0.5.4
Datum uploadu: 14 Apr 15
Vývojka: Yutaka Matsubara
Licence: Volný
Popularita: 1

Rating: nan/5 (Total Votes: 0)

meinheld ještě další asynchronní webový server, jako je fapws3, tornáda.
meinheld je WSGI kompatibilní webový server.
Instalace
Instalace z pypi:
& Nbsp; easy_install -ZU meinheld
Instalace ze zdrojových kódů:
& Nbsp; python setup.py nainstalovat
meinheld podporují gunicorn.
Chcete-li nainstalovat gunicorn:
& Nbsp; easy_install -ZU gunicorn
Základní použití
jednoduchá WSGI app:
od meinheld import serveru
def hello_world (prostř, start_response):
& Nbsp; status = '200 OK "
& nbsp; res = "Hello World!"
& Nbsp; response_headers = [("Content-type", "text / plain"), ("Content-Length", str (len (res)))]
& Nbsp; start_response (stav, response_headers)
& Nbsp; návrat [res]
server.listen (("0.0.0.0", 8000))
server.run (hello_world)
s gunicorn. Uživatel pracovník class "meinheld.gmeinheld.MeinheldWorker":
$ Gunicorn --workers = 2 --worker-class = "meinheld.gmeinheld.MeinheldWorker" gunicorn_test: app
Výkon
meinheld se používá vysoce výkonné http_parser.
(Viz http://github.com/ry/http-parser)
a useing vysoce výkonné knihovny událost picoev.
(Viz http://developer.cybozu.co.jp/kazuho/2009/08/picoev-a-tiny-e.html)
jednoduché měřítko
jednoduchý hello_world lavice:
def hello_world (prostř, start_response):
& Nbsp; status = '200 OK "
& nbsp; res = "Hello World!"
& Nbsp; response_headers = [("Content-type", "text / plain"), ("Content-Length", str (len (res)))]
& Nbsp; start_response (stav, response_headers)
& Nbsp; návrat [res]
použijte Apach lavice:
$ Ab -c 100 N 10.000 http://127.0.0.1:8000/
spec
& Nbsp; * CPU: Intel (R) Atom (TM) CPU N270 @ 1.60GHz
& Nbsp; * Memoy: 1G
& Nbsp; * OS: Ubuntu 10.04
server požaduje za sekundu
meinheld 0.1 2927,62 [# / sec]
fapws3 0.6 1293,53 [# / sec]
sendfile
. meinheld použití sendfile (2), přes wgsi.file_wrapper

Požadavky na :

  • Python

Ostatní software developer Yutaka Matsubara

Meinheld
Meinheld

1 Mar 15

Komentáře k meinheld

Komentáře nebyl nalezen
Přidat komentář
Zapnout obrázky!