unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* [ANN] unicorn 6.1.0 - Rack HTTP server for fast clients and *nix
@ 2021-12-25 18:06  4% Eric Wong
  0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2021-12-25 18:06 UTC (permalink / raw)
  To: ruby-talk, unicorn-public

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 world back decades in terms of concurrency.

Note:
.onion URLs below are available for Tor users and can reduce
our operating costs:

* https://yhbt.net/unicorn/
  http://unicorn.7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/
* public list: unicorn-public@yhbt.net
* mail archives: https://yhbt.net/unicorn-public/
  http://7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/unicorn-public/
* git clone https://yhbt.net/unicorn.git
  torsocks git clone http://7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/unicorn.git
* https://yhbt.net/unicorn/NEWS.atom.xml
  http://unicorn.7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/NEWS.atom.xml
* nntps://news.public-inbox.org/inbox.comp.lang.ruby.unicorn
  nntp://7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/inbox.comp.lang.ruby.unicorn
  imaps://yhbt.net/inbox.comp.lang.ruby.unicorn.0
  imap://7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/inbox.comp.lang.ruby.unicorn.0

Changes:

    This release reduces CPU usage for Linux 4.5+ in most cases.
    See "[PATCH 6/6] use EPOLLEXCLUSIVE on Linux 4.5+" for more details:
      https://yhbt.net/unicorn-public/20211001030923.26705-7-bofh@yhbt.net/

    There's a couple of updates for Ruby 3.1, but we've finally
    started relying on Ruby 2.0.0 features after 9 years :P
    (so Ruby 1.9.3 users are stuck with older versions).

    And the usual round of doc updates and some build speedups.

    13 changes by the Bozo Doofus maintainer since v6.0.0:

          test_util: less excessive encoding tests
          drop Ruby 1.9.3 support, require 2.0+ for now
          drop unnecessary IO#close_on_exec=true assignment
          extconf.rb: get rid of unnecessary checks
          makefile: reduce unnecessary rebuilds
          HACKING: drop outdated information about pandoc
          http_server: get rid of Process.ppid check
          worker_loop: get rid of select() avoidance hack
          use EPOLLEXCLUSIVE on Linux 4.5+
          allow Ruby to deduplicate remaining globals
          epollexclusive: remove rb_gc_force_recycle call
          drop Ruby version warning, fix speling errer
          doc: v3 .onion updates, nntp => nntps, minor wording changes

^ permalink raw reply	[relevance 4%]

* [PATCH] allow Ruby to deduplicate remaining globals
@ 2021-10-22  4:05  7% Eric Wong
  0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2021-10-22  4:05 UTC (permalink / raw)
  To: unicorn-public

Most of these are bound to be used in Rack/Rails/apps/gems,
(though possibly with different encodings).  Give Ruby
a chance to deduplicate them, at least.
---
 ext/unicorn_http/common_field_optimization.h | 1 -
 ext/unicorn_http/global_variables.h          | 2 +-
 ext/unicorn_http/unicorn_http.rl             | 1 +
 3 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/ext/unicorn_http/common_field_optimization.h b/ext/unicorn_http/common_field_optimization.h
index 0659fc7..250e43e 100644
--- a/ext/unicorn_http/common_field_optimization.h
+++ b/ext/unicorn_http/common_field_optimization.h
@@ -83,7 +83,6 @@ static void init_common_fields(void)
   struct common_field *cf = common_http_fields;
   char tmp[64];
 
-  id_uminus = rb_intern("-@");
   memcpy(tmp, HTTP_PREFIX, HTTP_PREFIX_LEN);
 
   for(i = ARRAY_SIZE(common_http_fields); --i >= 0; cf++) {
diff --git a/ext/unicorn_http/global_variables.h b/ext/unicorn_http/global_variables.h
index f8e694c..c9ceebd 100644
--- a/ext/unicorn_http/global_variables.h
+++ b/ext/unicorn_http/global_variables.h
@@ -55,7 +55,7 @@ NORETURN(static void parser_raise(VALUE klass, const char *));
 
 /** Defines global strings in the init method. */
 #define DEF_GLOBAL(N, val) do { \
-  g_##N = rb_obj_freeze(rb_str_new(val, sizeof(val) - 1)); \
+  g_##N = str_new_dd_freeze(val, (long)sizeof(val) - 1); \
   rb_gc_register_mark_object(g_##N); \
 } while (0)
 
diff --git a/ext/unicorn_http/unicorn_http.rl b/ext/unicorn_http/unicorn_http.rl
index 605b23f..ba23438 100644
--- a/ext/unicorn_http/unicorn_http.rl
+++ b/ext/unicorn_http/unicorn_http.rl
@@ -968,6 +968,7 @@ void Init_unicorn_http(void)
   e414 = rb_define_class_under(mUnicorn, "RequestURITooLongError",
                                eHttpParserError);
 
+  id_uminus = rb_intern("-@");
   init_globals();
   rb_define_alloc_func(cHttpParser, HttpParser_alloc);
   rb_define_method(cHttpParser, "initialize", HttpParser_init, 0);

^ permalink raw reply related	[relevance 7%]

Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2021-10-22  4:05  7% [PATCH] allow Ruby to deduplicate remaining globals Eric Wong
2021-12-25 18:06  4% [ANN] unicorn 6.1.0 - 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).