-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathindex.html
301 lines (281 loc) · 10.3 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
---
layout: layout
title: A Fast, Concurrent Web Server for Ruby & Rack
---
<div id="marketing-page">
<div id="overview">
<h2>Speed & Concurrency</h2>
<p class="current-release">
<span>
Current Release: <strong id='version'>6.6.0</strong>
</span>
</p>
<p>
Unlike other Ruby Webservers, Puma was built for speed and
parallelism. Puma is a small library that provides a very
fast and concurrent HTTP 1.1 server for Ruby web applications.
It is designed for running Rack apps only.
</p>
<p>
What makes Puma so fast is the careful use of a Ragel
extension to provide fast, accurate HTTP 1.1 protocol parsing.
This makes the server scream without too many portability
issues.
</p>
</div>
<div id="usage">
<div id="quickstart-with-bundler" class="quickstart">
<h3>Quickstart with Bundler</h3>
<p>
If you are using <a href="https://bundler.io">Bundler</a>,
just add Puma to your project's Gemfile:
</p>
<p class="code gemfile">
gem "puma"
</p>
<p>
Once you've installed your bundle, start Puma by running:
</p>
<p class="command">
bundle exec puma
</p>
</div>
<div id="quickstart-without-bundler" class="quickstart">
<h3>Quickstart without Bundler</h3>
<p>
If you are not using <a href="https://bundler.io">Bundler</a>,
you can install Puma directly from the command line:
</p>
<p class="command">
gem install puma
</p>
<p>
Once installed, start Puma by running:
</p>
<p class="command">
puma
</p>
</div>
<div id="resources">
<h3>Resources</h3>
<ul class="resources">
<li class="document">
<strong><a href="https://github.com/puma/puma">Code on Github</a></strong>
<svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewbox="0 0 12 12">
<path fill="#f4f2eb" stroke="#0089a5" d="M1.5 4.518h5.982V10.5H1.5z"/>
<path fill="#0089a5" d="M5.765 1H11v5.39L9.427 7.937l-1.31-1.31L5.393 9.35l-2.69-2.688 2.81-2.808L4.2 2.544z"/>
<path fill="#f4f2eb" d="M9.995 2.004l.022 4.885L8.2 5.07 5.32 7.95 4.09 6.723l2.882-2.88-1.85-1.852z"/>
</svg>
</li>
<li class="document">
<strong><a href="https://rubygems.org/gems/puma">RubyGem</a></strong>
<svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewbox="0 0 12 12">
<path fill="#f4f2eb" stroke="#0089a5" d="M1.5 4.518h5.982V10.5H1.5z"/>
<path fill="#0089a5" d="M5.765 1H11v5.39L9.427 7.937l-1.31-1.31L5.393 9.35l-2.69-2.688 2.81-2.808L4.2 2.544z"/>
<path fill="#f4f2eb" d="M9.995 2.004l.022 4.885L8.2 5.07 5.32 7.95 4.09 6.723l2.882-2.88-1.85-1.852z"/>
</svg>
</li>
<li class="document">
<strong><a href="https://msp-greg.github.io/puma/">Documentation: master</a></strong>
<svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewbox="0 0 12 12">
<path fill="#f4f2eb" stroke="#0089a5" d="M1.5 4.518h5.982V10.5H1.5z"/>
<path fill="#0089a5" d="M5.765 1H11v5.39L9.427 7.937l-1.31-1.31L5.393 9.35l-2.69-2.688 2.81-2.808L4.2 2.544z"/>
<path fill="#f4f2eb" d="M9.995 2.004l.022 4.885L8.2 5.07 5.32 7.95 4.09 6.723l2.882-2.88-1.85-1.852z"/>
</svg>
</li>
<li class="document">
<strong><a href="puma/">Documentation: 6.6.0</a></strong>
</li>
<li class="document">
<strong><a href="puma5/">Documentation: 5.6.9</a></strong>
</li>
<li class="document">
<strong><a href="puma4/">Documentation: 4.3.12</a></strong>
</li>
<!--
<li class="document">
<strong><a href="page.html">Full Documentation</a></strong>
</li>
<li class="document">
<a href="page.html">Advanced Setup with Sinatra, Rails, & Rackup</a>
</li>
<li class="document">
How to Use Puma:<br />
<a href="page.html">On Engine Yard</a> •
<a href="page.html">On Heroku</a> •
<a href="page.html">In Your Stack</a>
</li>
-->
<li class="asset">
<a href="logos-and-assets.html">Puma Logos and Assets</a>
</li>
</ul>
</div>
</div>
<div id="comparisons" class="section">
<h3>Puma Vs. Other Webservers</h3>
<div id="memory-usage-comparison" class="comparison">
<h4>
Memory Usage Comparison
<span>(Showing memory usage over time - less is better)</span>
</h4>
<ul>
<li style="width:13%;" class="puma-1">
<p>Puma - <span class="speed">78 Mb</span></p>
</li>
<li style="width:26%;" class="competitor-1">
<p>Rainbows! (1x16) - <span class="speed">120 Mb</span></p>
</li>
<li style="width:93%;" class="competitor-2">
<p>Unicorn - <span class="speed">1076 Mb</span></p>
</li>
<li style="width:100%;" class="competitor-3">
<p>Rainbows! (16x32) - <span class="speed">1138 Mb</span></p>
</li>
</ul>
</div>
<div id="speed-comparison" class="comparison">
<h4>
Speed Comparison
<span>(Requests per second plotted against the number of concurrent requests - more is better)</span>
</h4>
<table>
<thead>
<tr>
<td></td>
<th scope="col">1</th>
<th scope="col">2</th>
<th scope="col">3</th>
<th scope="col">4</th>
<th scope="col">5</th>
<th scope="col">10</th>
<th scope="col">20</th>
<th scope="col">30</th>
<th scope="col">40</th>
<th scope="col">50</th>
</tr>
</thead>
<tbody>
<tr class="puma-1">
<th scope="row">Puma (16:16)</th>
<td>3264</td>
<td>6575</td>
<td>8969</td>
<td>9923</td>
<td>9925</td>
<td>9693</td>
<td>9482</td>
<td>9306</td>
<td>9341</td>
<td>9219</td>
</tr>
<tr class="puma-1d">
<th scope="row">Puma (16:16, KA)</th>
<td>4589</td>
<td>8849</td>
<td>12245</td>
<td>14601</td>
<td>15909</td>
<td>14419</td>
<td>12939</td>
<td>12564</td>
<td>12701</td>
<td>12538</td>
</tr>
<tr class="competitor-1">
<th scope="row">Rainbows! (1x16)</th>
<td>673</td>
<td>1161</td>
<td>1486</td>
<td>1730</td>
<td>1949</td>
<td>1814</td>
<td>778</td>
<td>782</td>
<td>727</td>
<td>710</td>
</tr>
<tr class="competitor-1d">
<th scope="row">Rainbows! (1x16, KA)</th>
<td>775</td>
<td>1336</td>
<td>1715</td>
<td>2006</td>
<td>2271</td>
<td>2085</td>
<td>732</td>
<td>1092</td>
<td>634</td>
<td>315</td>
</tr>
<tr class="competitor-2">
<th scope="row">Unicorn</th>
<td>557</td>
<td>1054</td>
<td>1535</td>
<td>2032</td>
<td>2450</td>
<td>3958</td>
<td>5329</td>
<td>9330</td>
<td>8938</td>
<td>5235</td>
</tr>
<tr class="competitor-2d">
<th scope="row">Unicorn (KA)</th>
<td>554</td>
<td>1031</td>
<td>1517</td>
<td>1967</td>
<td>2457</td>
<td>3938</td>
<td>5292</td>
<td>9727</td>
<td>8985</td>
<td>9298</td>
</tr>
<tr class="competitor-3">
<th scope="row">Rainbows! (16x32)</th>
<td>583</td>
<td>1150</td>
<td>1675</td>
<td>2173</td>
<td>2667</td>
<td>3152</td>
<td>3345</td>
<td>3384</td>
<td>3324</td>
<td>3417</td>
</tr>
<tr class="competitor-3d">
<th scope="row">Rainbows! (16x32, KA)</th>
<td>760</td>
<td>1479</td>
<td>2200</td>
<td>2853</td>
<td>3464</td>
<td>5413</td>
<td>7320</td>
<td>7350</td>
<td>7273</td>
<td>6419</td>
</tr>
</tbody>
</table>
<p>
Notes:
<ul>
<li>The KA entries are the benchmark run with the client doing keepalive requests.</li>
</ul>
</p>
</div>
</div>
<div id="history" class="section">
<h3>Puma History</h3>
<p>Puma comes from a long line of ruby webservers derived from Zed Shaw's seminal work on Mongrel. The primary element that remains is Mongrel's great HTTP parser written in ragel and executed in either C or Java, depending on the ruby implementation.</p>
<p>Evan Phoenix looked at Mongrel and saw a chance to take the idea and move it forward to incorporate two elements absent from the original work. Firstly, the Ruby world has moved almost entirely to using Rack as the primary interface for web apps. Mongrel was written in a pre-Rack world, so the first thing Puma did was cut out all the unnecessary abstractions and support the Rack interface directly. Second, Puma is designed to be used on a Ruby implementation which provides true parallelism, such as Rubinius and JRuby. Tuning for the capability and patterns that these implementations provide meant rethinking how requests entered the system and were handled. Incorporating these ideas, Puma was born from Mongrel and began moving forward.</p>
<p>Today, Puma runs on all Ruby implementations, but will always run best on any implementation that provides true parallelism. It looks to provide a simple and high performance request/response pipeline to Rack apps, allowing it to be used by nearly all ruby web applications.</p>
<h3>Created By</h3>
<p>Puma was created by Evan Phoenix in late 2011 as a derivative of Mongrel. Now, most of the original Mongrel code has been rewritten except for the parser. The git history for the project provides a timeline of the evolution of the project.</p>
</div>
</div>