Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

kalebr-pusher

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kalebr-pusher

  • 0.6.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

How to use it

Requirements

  • Ruby 2.1.2 or greater
  • Redis

Server setup

Most linux distributions have by defualt a very low open files limit. In order to sustain more than 1024 ( default ) connections, you need to apply the following changes to your system: Add to /etc/sysctl.conf:

fs.file-max = 50000

Add to /etc/security/limits.conf:

* hard nofile 50000
* soft nofile 50000
* hard nproc 50000
* soft nproc 50000
$ kalerbr-pusher --app_key 765ec374ae0a69f4ce44 --secret your-pusher-secret

If all went to plan you should see the following output to STDOUT

kalebr-pusher API server listening on port 4567 kalebr-pusher WebSocket server listening on port 8080

Modifying your application code to use the Kalebr service

...

Pusher.host   = 'kalebr.example.com'
Pusher.port   = 4567

You will also need to do the same to the Pusher JavaScript client in your client side JavaScript, e.g

<script type="text/javascript">
  var pusher = new Pusher('#{Pusher.key}', {
    wsHost: "0.0.0.0",
    wsPort: "8080",
    wssPort: "8080",
    enabledTransports: ['ws', 'flash']
  });
</script>

Of course you could proxy all requests to ws.example.com to port 8080 of your kalerbr-pusher node and api.example.com to port 4567 of your kalerbr-pusher node for example, that way you would only need to set the host property of the Pusher client.

Author

  • Nilanga Saluwadana

© 2016

FAQs

Package last updated on 29 Aug 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc