unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
 Warning: Initial query:
 %22test/benchmark/readinput: demo for slowly uploading clients%22
 returned no results, used:
 "test/benchmark/readinput: demo for slowly uploading clients"
 instead

Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* [ANN] unicorn 5.5.2 - Rack HTTP server for fast clients and *nix
@ 2019-12-20  2:15  5% Eric Wong
  0 siblings, 0 replies; 3+ results
From: Eric Wong @ 2019-12-20  2:15 UTC (permalink / raw)
  To: ruby-talk, unicorn-public; +Cc: Terry Scheingeld

unicorn is an HTTP server for Rack applications designed to only serve
fast clients on low-latency, high-bandwidth connections and take
advantage of features in Unix/Unix-like kernels.  Slow clients should
only be served by placing a reverse proxy capable of fully buffering
both the the request and response in between unicorn and slow clients.

Disclaimer:

Due to its ability to tolerate crashes and isolate clients, unicorn
is unfortunately known to prolong the existence of bugs in applications
and libraries which run on top of it.

Consider this just an announcement to inform existing users of a
new version, not something to convince you to switch to something
that set the entire Ruby back decades in terms of concurrency.

* https://bogomips.org/unicorn/
* public list: unicorn-public@bogomips.org
* mail archives: https://bogomips.org/unicorn-public/
* git clone https://bogomips.org/unicorn.git
* https://bogomips.org/unicorn/NEWS.atom.xml
* nntp://news.public-inbox.org/inbox.comp.lang.ruby.unicorn

Changes:

Thanks to Terry Scheingeld, we now workaround a Ruby bug
and can now run with taint checks enabled:
<https://bugs.ruby-lang.org/issues/14485>
<https://bogomips.org/unicorn-public/CABg1sXrvGv9G6CDQxePDUqTe6N-5UpLXm7eG3YQO=dda-Cgg7A@mail.gmail.com/>

There's also a few documentation updates and building packages
from source is easier since pandoc is no longer a dependency
(and I can no longer afford the bandwidth or space to install
it).

Eric Wong (7):
      test/benchmark/ddstream: demo for slowly reading clients
      test/benchmark/readinput: demo for slowly uploading clients
      test/benchmark/uconnect: test for accept loop speed
      examples/unicorn@.service: note the NonBlocking flag
      Merge remote-tracking branch 'origin/ts/tmpio'
      test_util: get rid of some unused variables in tests
      doc: replace pandoc-"Markdown" with real manpages

Terry Scheingeld (1):
      tmpio: workaround File#path being tainted on unlink

havpbea: orngvat n qrnq ubefr hagvy gur fgvpx trgf fghpx va vg'f fxhyy

^ permalink raw reply	[relevance 5%]

* [PATCH 2/3] test/benchmark/readinput: demo for slowly uploading clients
  2019-05-12 22:25  7% [PATCH 0/3] slow clients and test/benchmark tools Eric Wong
@ 2019-05-12 22:25  5% ` Eric Wong
  0 siblings, 0 replies; 3+ results
From: Eric Wong @ 2019-05-12 22:25 UTC (permalink / raw)
  To: unicorn-public

This is intended to demonstrate how badly we suck at dealing
with slow clients making uploads.  It can help users evaluate
alternative fully-buffering reverse proxies, because nginx
should not be the only option.
---
 test/benchmark/README       |  5 +++++
 test/benchmark/readinput.ru | 40 +++++++++++++++++++++++++++++++++++++
 2 files changed, 45 insertions(+)
 create mode 100644 test/benchmark/readinput.ru

diff --git a/test/benchmark/README b/test/benchmark/README
index e9b7a41..cd929f3 100644
--- a/test/benchmark/README
+++ b/test/benchmark/README
@@ -47,6 +47,11 @@ is NOT our problem.  That is the job of nginx (or similar).
 Standalone Rack app intended to show how BAD we are at slow clients.
 See usage in comments.
 
+== readinput.ru
+
+Standalone Rack app intended to show how bad we are with slow uploaders.
+See usage in comments.
+
 == Contributors
 
 This directory is intended to remain stable.  Do not make changes
diff --git a/test/benchmark/readinput.ru b/test/benchmark/readinput.ru
new file mode 100644
index 0000000..c91bec3
--- /dev/null
+++ b/test/benchmark/readinput.ru
@@ -0,0 +1,40 @@
+# This app is intended to test large HTTP requests with or without
+# a fully-buffering reverse proxy such as nginx. Without a fully-buffering
+# reverse proxy, unicorn will be unresponsive when client count exceeds
+# worker_processes.
+
+DOC = <<DOC
+To demonstrate how bad unicorn is at slowly uploading clients:
+
+  # in one terminal, start unicorn with one worker:
+  unicorn -E none -l 127.0.0.1:8080 test/benchmark/readinput.ru
+
+  # in a different terminal, upload 45M from multiple curl processes:
+  dd if=/dev/zero bs=45M count=1 | curl -T- -HExpect: --limit-rate 1M \
+     --trace-time -v http://127.0.0.1:8080/ &
+  dd if=/dev/zero bs=45M count=1 | curl -T- -HExpect: --limit-rate 1M \
+     --trace-time -v http://127.0.0.1:8080/ &
+  wait
+
+# The last client won't see a response until the first one is done uploading
+# You also won't be able to make GET requests to view this documentation
+# while clients are uploading.  You can also view the stderr debug output
+# of unicorn (see logging code in #{__FILE__}).
+DOC
+
+run(lambda do |env|
+  input = env['rack.input']
+  buf = ''.b
+
+  # default logger contains timestamps, rely on that so users can
+  # see what the server is doing
+  l = env['rack.logger']
+
+  l.debug('BEGIN reading input ...') if l
+  :nop while input.read(16384, buf)
+  l.debug('DONE reading input ...') if l
+
+  buf.clear
+  [ 200, [ %W(Content-Length #{DOC.size}), %w(Content-Type text/plain) ],
+    [ DOC ] ]
+end)
-- 
EW


^ permalink raw reply related	[relevance 5%]

* [PATCH 0/3] slow clients and test/benchmark tools
@ 2019-05-12 22:25  7% Eric Wong
  2019-05-12 22:25  5% ` [PATCH 2/3] test/benchmark/readinput: demo for slowly uploading clients Eric Wong
  0 siblings, 1 reply; 3+ results
From: Eric Wong @ 2019-05-12 22:25 UTC (permalink / raw)
  To: unicorn-public

Slowloris made waves nearly a decade ago, and there are still
people being misled into using the wrong reverse proxy for
unicorn.  Maybe these new standalone Rack apps can convince
folks to deploy unicorn correctly behind nginx, or better,
evaluate alternatives to nginx :>

Thus ddstream and readinput can help users evaluate
fully-buffering reverse proxies such as nginx, or similar :>

Finally, uconnect is intended to evaluate removal of the kgio
dependency (and maybe future speedups)

  test/benchmark/ddstream: demo for slowly reading clients
  test/benchmark/readinput: demo for slowly uploading clients
  test/benchmark/uconnect: test for accept loop speed

 test/benchmark/README        | 18 +++++++---
 test/benchmark/ddstream.ru   | 50 +++++++++++++++++++++++++++
 test/benchmark/readinput.ru  | 40 ++++++++++++++++++++++
 test/benchmark/uconnect.perl | 66 ++++++++++++++++++++++++++++++++++++
 4 files changed, 170 insertions(+), 4 deletions(-)
 create mode 100644 test/benchmark/ddstream.ru
 create mode 100644 test/benchmark/readinput.ru
 create mode 100755 test/benchmark/uconnect.perl

Creuncf lrg-nabgure-ubeevoyl-anzrq-freire pna shapgvba nf na
atvak ercynprzrag...

^ permalink raw reply	[relevance 7%]

Results 1-3 of 3 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2019-05-12 22:25  7% [PATCH 0/3] slow clients and test/benchmark tools Eric Wong
2019-05-12 22:25  5% ` [PATCH 2/3] test/benchmark/readinput: demo for slowly uploading clients Eric Wong
2019-12-20  2:15  5% [ANN] unicorn 5.5.2 - Rack HTTP server for fast clients and *nix Eric Wong

Code repositories for project(s) associated with this public inbox

	https://yhbt.net/unicorn.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).