Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

support unix socket HTTP server for nodeos #7967

Merged
merged 1 commit into from
Sep 23, 2019

Conversation

spoonincode
Copy link
Contributor

Change Description

When unix socket support for the http plugin was initially added it was implicitly disabled for nodeos because it was only available to configure if the program activating http plugin had a default unix socket path set. (keosd had a default, nodeos doesn't)

Some users have requested the ability to use unix socket for nodeos because they have something in front of nodeos (like haproxy) and desire the, at least on paper, lower overhead of a unix socket.

This PR removes the check thus allowing any application using http plugin (like nodeos) to enable the unix socket by configuring it appropriately. It still is off by default for nodeos.

Enabling it for nodeos is as simple as a unix-socket-path = nodeos.sock for example. And to test you can curl --unix-socket $EOSIO_DATA_DIR/nodeos.sock http://x/v1/chain/get_info

Consensus Changes

  • Consensus Changes

API Changes

  • API Changes

Documentation Additions

  • Documentation Additions

@@ -392,6 +392,10 @@ namespace eosio {
cfg.add_options()
("unix-socket-path", bpo::value<string>()->default_value(current_http_plugin_defaults.default_unix_socket_path),
"The filename (relative to data-dir) to create a unix socket for HTTP RPC; set blank to disable.");
else
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unfortunately I had to do the else here because default_value() balked at an empty string 🤷‍♂

@spoonincode spoonincode merged commit 1367bf7 into develop Sep 23, 2019
@spoonincode spoonincode deleted the allow_unix_socket_nodeos branch September 23, 2019 17:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants