<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/gitlab/gitlab-shell.git/spec/httpunix_spec.rb, branch remove-hooks</title>
<subtitle>gitlab.com: gitlab-org/gitlab-shell.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-shell.git/'/>
<entry>
<title>Remove usages of `its` in specs</title>
<updated>2018-08-15T21:04:16+00:00</updated>
<author>
<name>Robert Speicher</name>
<email>rspeicher@gmail.com</email>
</author>
<published>2018-08-14T20:02:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-shell.git/commit/?id=b9d086e9dbcbd238426b10069d621c5af0f87ac8'/>
<id>b9d086e9dbcbd238426b10069d621c5af0f87ac8</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Autocorrect specs via `transpec -k its -v stub_with_hash`</title>
<updated>2018-08-15T21:04:11+00:00</updated>
<author>
<name>Robert Speicher</name>
<email>rspeicher@gmail.com</email>
</author>
<published>2018-08-14T19:54:33+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-shell.git/commit/?id=cfec435a64ec7571a8333dc754afac0a41ebc6d8'/>
<id>cfec435a64ec7571a8333dc754afac0a41ebc6d8</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix tests that fail locally</title>
<updated>2018-03-13T13:52:42+00:00</updated>
<author>
<name>Jacob Vosmaer (GitLab)</name>
<email>jacob@gitlab.com</email>
</author>
<published>2018-03-13T13:52:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-shell.git/commit/?id=a9e4f68d299222070f0c25af65f94419c9c233a6'/>
<id>a9e4f68d299222070f0c25af65f94419c9c233a6</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Introduce a more-complete implementation of bin/authorized_keys</title>
<updated>2017-12-19T14:09:12+00:00</updated>
<author>
<name>Nick Thomas</name>
<email>nick@gitlab.com</email>
</author>
<published>2017-12-19T11:42:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-shell.git/commit/?id=5c61b2ef7a3b016cfe41f9569679ad7ad6c57112'/>
<id>5c61b2ef7a3b016cfe41f9569679ad7ad6c57112</id>
<content type='text'>
bin/authorized_keys doesn't check that the requesting user matches the expected
user, so to enable database authorized keys lookups, we currently ask the admin
to create a custom script for that purpose.

Better is to have a complete script that can perform the whole task. This commit
introduces bin/gitlab-shell-authorized-keys-check which does so.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
bin/authorized_keys doesn't check that the requesting user matches the expected
user, so to enable database authorized keys lookups, we currently ask the admin
to create a custom script for that purpose.

Better is to have a complete script that can perform the whole task. This commit
introduces bin/gitlab-shell-authorized-keys-check which does so.
</pre>
</div>
</content>
</entry>
<entry>
<title>Use a shorter socket path during testing</title>
<updated>2017-05-03T13:24:36+00:00</updated>
<author>
<name>Jacob Vosmaer</name>
<email>jacob@gitlab.com</email>
</author>
<published>2017-05-03T13:16:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-shell.git/commit/?id=8e27afa7fe673dd2bcc6ca7f48b544c99f4f09b8'/>
<id>8e27afa7fe673dd2bcc6ca7f48b544c99f4f09b8</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>trying new workaround for shutdown_pipe issue</title>
<updated>2016-02-10T12:33:46+00:00</updated>
<author>
<name>James Lopez</name>
<email>james@jameslopez.es</email>
</author>
<published>2016-02-10T12:33:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-shell.git/commit/?id=c28af5c6ada34be1b05b7cf8c034949fdb9d5212'/>
<id>c28af5c6ada34be1b05b7cf8c034949fdb9d5212</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>workaround for webrick issue on ruby 2.2</title>
<updated>2016-02-09T17:19:16+00:00</updated>
<author>
<name>James Lopez</name>
<email>james@jameslopez.es</email>
</author>
<published>2016-02-09T17:19:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-shell.git/commit/?id=3d2df984661269c1335752af8232e8b2248ce4d1'/>
<id>3d2df984661269c1335752af8232e8b2248ce4d1</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add support to connect gitlab-shell to Unicorn via UNIX socket</title>
<updated>2015-11-10T17:33:24+00:00</updated>
<author>
<name>Kirill Smelkov</name>
<email>kirr@nexedi.com</email>
</author>
<published>2015-11-06T10:41:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-shell.git/commit/?id=184385ac5b15ee8b7dc6fa5278f7e711de275921'/>
<id>184385ac5b15ee8b7dc6fa5278f7e711de275921</id>
<content type='text'>
It is well known that UNIX sockets are faster than TCP over loopback.

E.g. on my machine according to lmbench[1] they have ~ 2 times
lower latency and ~ 2-3 times more throughput compared to TCP over
loopback:

    *Local* Communication latencies in microseconds - smaller is better
    ---------------------------------------------------------------------
    Host                 OS 2p/0K  Pipe AF     UDP  RPC/   TCP  RPC/ TCP
                            ctxsw       UNIX         UDP         TCP conn
    --------- ------------- ----- ----- ---- ----- ----- ----- ----- ----
    teco      Linux 4.2.0-1  13.8  29.2 26.8  45.0  47.9  48.5  55.5  45.

    *Local* Communication bandwidths in MB/s - bigger is better
    -----------------------------------------------------------------------------
    Host                OS  Pipe AF    TCP  File   Mmap  Bcopy  Bcopy  Mem   Mem
                                 UNIX      reread reread (libc) (hand) read write
    --------- ------------- ---- ---- ---- ------ ------ ------ ------ ---- -----
    teco      Linux 4.2.0-1 1084 4353 1493 2329.1 3720.7 1613.8 1109.2 3402 1404.

The same ratio usually holds for servers.

Also UNIX sockets, since they reside on filesystem, besides being faster with
less latency, have one another nice property: access permissions to them are
managed the same way access to files is.

Because of lower latencies and higher throughput - for performance reasons, and
for easier security, it makes sense to interconnect services on one machine via
UNIX sockets and talk via TCP only to outside world.

All internal services inside GitLab can talk to each other via UNIX socket
already and only gitlab-shell was missing support to talk to Unicorn via UNIX
socket.

Let's teach gitlab-shell to talk via UNIX sockets.

[1] http://www.bitmover.com/lmbench/

~~~~

In this patch we

- add URI::HTTPUNIX to handle http+unix:// URI scheme
- add Net::HTTPUNIX to handle "connect via unix socket and then talk http"
- adjust GitlabNet#http_client_for() accordingly
- adjust documentation in config.yml.example

The http+unix:// scheme is not reinvented anew: the idea about its structure is
quite logical an was already established at least in requests-unixsocket python
package:

    http://fixall.online/theres-no-need-to-reinvent-the-wheelhttpsgithubcommsabramorequests-unixsocketurl/241810/
    https://github.com/msabramo/requests-unixsocket
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It is well known that UNIX sockets are faster than TCP over loopback.

E.g. on my machine according to lmbench[1] they have ~ 2 times
lower latency and ~ 2-3 times more throughput compared to TCP over
loopback:

    *Local* Communication latencies in microseconds - smaller is better
    ---------------------------------------------------------------------
    Host                 OS 2p/0K  Pipe AF     UDP  RPC/   TCP  RPC/ TCP
                            ctxsw       UNIX         UDP         TCP conn
    --------- ------------- ----- ----- ---- ----- ----- ----- ----- ----
    teco      Linux 4.2.0-1  13.8  29.2 26.8  45.0  47.9  48.5  55.5  45.

    *Local* Communication bandwidths in MB/s - bigger is better
    -----------------------------------------------------------------------------
    Host                OS  Pipe AF    TCP  File   Mmap  Bcopy  Bcopy  Mem   Mem
                                 UNIX      reread reread (libc) (hand) read write
    --------- ------------- ---- ---- ---- ------ ------ ------ ------ ---- -----
    teco      Linux 4.2.0-1 1084 4353 1493 2329.1 3720.7 1613.8 1109.2 3402 1404.

The same ratio usually holds for servers.

Also UNIX sockets, since they reside on filesystem, besides being faster with
less latency, have one another nice property: access permissions to them are
managed the same way access to files is.

Because of lower latencies and higher throughput - for performance reasons, and
for easier security, it makes sense to interconnect services on one machine via
UNIX sockets and talk via TCP only to outside world.

All internal services inside GitLab can talk to each other via UNIX socket
already and only gitlab-shell was missing support to talk to Unicorn via UNIX
socket.

Let's teach gitlab-shell to talk via UNIX sockets.

[1] http://www.bitmover.com/lmbench/

~~~~

In this patch we

- add URI::HTTPUNIX to handle http+unix:// URI scheme
- add Net::HTTPUNIX to handle "connect via unix socket and then talk http"
- adjust GitlabNet#http_client_for() accordingly
- adjust documentation in config.yml.example

The http+unix:// scheme is not reinvented anew: the idea about its structure is
quite logical an was already established at least in requests-unixsocket python
package:

    http://fixall.online/theres-no-need-to-reinvent-the-wheelhttpsgithubcommsabramorequests-unixsocketurl/241810/
    https://github.com/msabramo/requests-unixsocket
</pre>
</div>
</content>
</entry>
</feed>
