Giter VIP home page Giter VIP logo

charts's Introduction

soketi

CI codecov Latest Stable Version Total Downloads License

Artifact Hub

Discord

Next-gen, Pusher-compatible, open-source WebSockets server. Simple, fast, and resilient. ๐Ÿ“ฃ

๐Ÿค Supporting

Soketi is meant to be open source, forever and ever. It solves issues that many developers face - the one of wanting to be limitless while testing locally or performing benchmarks. More than that, itt is also suited for production usage, either it is public for your frontend applications or internal to your team.

The frequency of releases and maintenance is based on the available time, which is tight as hell. Recently, there were issues with the maintenance and this caused infrequent updates, as well as infrequent support.

To cover some of the expenses of handling new features or having to maintain the project, we would be more than happy if you can donate towards the goal. This will ensure that Soketi will be taken care of at its full extent.

๐Ÿ’ฐ Sponsor the development via Github Sponsors

Logos from Sponsors

Soketi

Blazing fast speed โšก

The server is built on top of uWebSockets.js - a C application ported to Node.js. uWebSockets.js is demonstrated to perform at levels 8.5x that of Fastify and at least 10x that of Socket.IO. (source)

Cheaper than most competitors ๐Ÿค‘

For a $49 plan on Pusher, you get a limited amount of connections (500) and messages (30M).

With Soketi, for the price of an instance on Vultr or DigitalOcean ($5-$10), you get virtually unlimited connections, messages, and some more!

Soketi is capable to hold thousands of active connections with high traffic on less than 1 GB and 1 CPU in the cloud. You can also get free $100 on Vultr to try out soketi โ†’

Easy to use ๐Ÿ‘ถ

Whether you run your infrastructure in containers or monoliths, soketi is portable. There are multiple ways to install and configure soketi, from single instances for development, to tens of active instances at scale with hundreds or thousands of active users.

Pusher Protocol ๐Ÿ“ก

soketi implements the Pusher Protocol v7. Your existing projects that connect to Pusher requires minimal code change to make it work with Soketi - you just add the host and port and swap the credentials.

App-based access ๐Ÿ”

Just like Pusher, you can access the API and WebSockets through the apps you define. Store the data with the built-in support for static arrays, DynamoDB and SQL-based servers like Postgres.

Production-ready! ๐Ÿค–

In addition to being a good companion during local development, soketi comes with the resiliency and speed required for demanding production applications. At scale with Redis, you get the breeze of scaling as you grow.

Built-in monitoring ๐Ÿ“ˆ

You just have to scrape the Prometheus metrics. Soketi offers a lot of metrics to monitor the deployment and

See it in action

Deployments

Community projects

๐Ÿ“ƒ Documentation

The entire documentation is available on Gitbook ๐ŸŒ

๐ŸŒŸ Stargazers

We really appreciate how this project turned to be such a great success. It will always remain open-source, free, and maintained. This is the real-time as it should be.

Stargazers over time

๐Ÿค Contributing

Please see CONTRIBUTING for details.

โ‰ Ideas or Discussions?

Have any ideas that can make into the project? Perhaps you have questions? Jump into the discussions board or join the Discord channel

๐Ÿ”’ Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

๐ŸŽ‰ Credits

charts's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar github-actions[bot] avatar j0sh0nat0r avatar l3o-pold avatar nicko170 avatar rennokki avatar websmurf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

charts's Issues

Google Cloud deployment - crashing on bad port

Getting an error when deploying this chart to gke:

2022-02-15 14:21:35.906 CSTnode:internal/validators:216
Error
2022-02-15 14:21:35.906 CST throw new ERR_SOCKET_BAD_PORT(name, port, allowZero);
Error
2022-02-15 14:21:35.906 CST ^
Error
2022-02-15 14:21:35.906 CST{}
Error
2022-02-15 14:21:35.906 CSTRangeError [ERR_SOCKET_BAD_PORT]: Port should be > 0 and < 65536. Received udp://10.124.4.184:11002.
Error
2022-02-15 14:21:35.907 CST at new NodeError (node:internal/errors:371:5)
Error
2022-02-15 14:21:35.907 CST at validatePort (node:internal/validators:216:11)
Error
2022-02-15 14:21:35.907 CST at Socket.send (node:dgram:637:12)
Error
2022-02-15 14:21:35.907 CST at /app/node_modules/node-discover/lib/network.js:188:25
Error
2022-02-15 14:21:35.907 CST at Array.forEach (<anonymous>)
Error
2022-02-15 14:21:35.907 CST at /app/node_modules/node-discover/lib/network.js:187:26
Error
2022-02-15 14:21:35.907 CST at Network.encode (/app/node_modules/node-discover/lib/network.js:221:12)
Error
2022-02-15 14:21:35.907 CST at Network.send (/app/node_modules/node-discover/lib/network.js:180:10)
Error
2022-02-15 14:21:35.907 CST at Discover.hello (/app/node_modules/node-discover/lib/discover.js:361:17)
Error
2022-02-15 14:21:35.907 CST at /app/node_modules/node-discover/lib/discover.js:286:10 {
Error
2022-02-15 14:21:35.907 CST code: 'ERR_SOCKET_BAD_PORT'

Unable to deploy Soketi using Helm

EKS Cluster Version: 1.22
EKS Node Version: v1.22.17-eks-49d8fe8
Helm Version: version.BuildInfo{Version:"v3.11.2", GitCommit:"912ebc1cd10d38d340f048efaf0abda047c3468e", GitTreeState:"dirty", GoVersion:"go1.20.2"}

Steps to reproduce:

  1. Deploying application using commands from READ.me
    image
  2. Getting success message.
    image
  3. Expecting working app.

But currently I have broken POD with the message below

node:internal/validators:226
    throw new ERR_SOCKET_BAD_PORT(name, port, allowZero);
    ^

RangeError [ERR_SOCKET_BAD_PORT]: Port should be > 0 and < 65536. Received udp://172.20.63.90:11002.
    at new NodeError (node:internal/errors:387:5)
    at validatePort (node:internal/validators:226:11)
    at Socket.send (node:dgram:620:12)
    at /app/node_modules/node-discover/lib/network.js:188:25
    at Array.forEach (<anonymous>)
    at /app/node_modules/node-discover/lib/network.js:187:26
    at Network.encode (/app/node_modules/node-discover/lib/network.js:221:12)
    at Network.send (/app/node_modules/node-discover/lib/network.js:180:10)
    at Discover.hello (/app/node_modules/node-discover/lib/discover.js:361:17)
    at /app/node_modules/node-discover/lib/discover.js:286:10 {
  code: 'ERR_SOCKET_BAD_PORT'
}

Current POD status is
Restarting failing container

ERR_SOCKET_BAD_PORT on new cluster

Hello all,

I'm experiencing a strange behavior with this helm chart. For the truth this is the first time that something goes wrong with it, because in the past i've already used it without problems.

node:internal/validators:217 โ”‚ โ”‚ throw new ERR_SOCKET_BAD_PORT(name, port, allowZero); โ”‚ โ”‚ ^ โ”‚ โ”‚ โ”‚ โ”‚ RangeError [ERR_SOCKET_BAD_PORT]: Port should be > 0 and < 65536. Received udp://10.43.244.58:11002. โ”‚ โ”‚ at new NodeError (node:internal/errors:371:5) โ”‚ โ”‚ at validatePort (node:internal/validators:217:11) โ”‚ โ”‚ at Socket.send (node:dgram:637:12) โ”‚ โ”‚ at /app/node_modules/node-discover/lib/network.js:188:25 โ”‚ โ”‚ at Array.forEach (<anonymous>) โ”‚ โ”‚ at /app/node_modules/node-discover/lib/network.js:187:26 โ”‚ โ”‚ at Network.encode (/app/node_modules/node-discover/lib/network.js:221:12) โ”‚ โ”‚ at Network.send (/app/node_modules/node-discover/lib/network.js:180:10) โ”‚ โ”‚ at Discover.hello (/app/node_modules/node-discover/lib/discover.js:361:17) โ”‚ โ”‚ at /app/node_modules/node-discover/lib/discover.js:286:10 { โ”‚ โ”‚ code: 'ERR_SOCKET_BAD_PORT'

It seems that even with a values.yaml ( and without ) something get wrong with PORT.

Is this a bug? Or am I missing something?

Note : I'm using this in develop env through a k3d env, traefik based

thanks!

Environment variable in Network-Watcher of the Deployment for SERVER_PORT should not read from .Values.service.port

Hello,

When we launch the Socketi with Network watcher enabled, we get the below error:

Starting the watcher...
Namespace: dev
Pod name: soketi-soketii-5f845d945b-zj5mn
Server port: 6001
Memory threshold: 85%
Monitoring interval: 1s

In ChecksCurrentPod.php line 97:
                                                                               
  App\Commands\WatchNetworkCommand::getUsage(): Return value must be of type   
  array, null returned

After investigation, the following file / Line https://github.com/soketi/charts/blob/master/charts/soketi/templates/deployment.yaml#L76 is wrong and should not read the SERVER_PORT from .Values.service.port but instead should be the metrics server port 9601.

My suggestion is to add in values the following .Values.metrics.port and use it across the board where needed and in SERVER_PORT env of the network watcher.

I hope this helps everyone else as well!

Usage

What is this package usage ?

Can i show metrics of websocket transactions in my website ? (ex: Transfered messages per hour, connections per hour, etc)

Also is there any documentation to better understanding this package ?

Expose soketi service using Ingress

Hello,

Thank you for the effort of putting together a Helm chart, I was wondering if there's any example to expose the soketi service using Ingress controller?

What I've tried so far:

# https://kubernetes.io/docs/concepts/services-networking/ingress/#the-ingress-resource

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: ingress-nginx-ws
  namespace: {{ .Values.application.namespace }}
  annotations:
    nginx.ingress.kubernetes.io/rewrite-target: /$1
    nginx.ingress.kubernetes.io/backend-protocol: "FCGI"
    nginx.ingress.kubernetes.io/fastcgi-index: "index.php"
    nginx.ingress.kubernetes.io/fastcgi-params-configmap: "ingress-conf"
    nginx.ingress.kubernetes.io/websocket-services: php-soketi
    nginx.org/websocket-services: php-soketi
    nginx.ingress.kubernetes.io/proxy-read-timeout: "3600"
    nginx.ingress.kubernetes.io/proxy-send-timeout: "3600"

spec:
  ingressClassName: "nginx"
  rules:
  - http:
      paths:
      - path: /
        pathType: Prefix
        backend:
          service:
            name: {{ .Values.service.name }}
            port:
              name: {{ .Values.service.port.name }}
      - path: /ws
        pathType: Prefix
        backend:
          service:
            name: php-soketi
            port:
              number: 6001

but I recieve the following error using Laravel Echo:

(index):29 WebSocket connection to 'ws://192.168.58.2/ws:80/app/cuG014DSf9tjcjyvvuOHNfhBSZqqOBsp?protocol=7&client=js&version=8.4.0-rc2&flash=false' failed: WebSocket is closed before the connection is established.

Horizontal scaling support

The helm chart do not seems to handle horizontal scaling.
Following the https://docs.soketi.app/advanced-usage/horizontal-scaling/clustering documentation, I used the following env vars.

env:
- name: PORT
  value: "6001"
- name: MODE
  value: full
- name: CLUSTER_PORT
  value: "11002"
- name: SOKETI_DEBUG
  value: "1"
- name: ADAPTER_DRIVER
  value: cluster

I ended with 3 nodes that were elected master with the following logs:

soketi-66bfb59674-wmnxg soketi [Fri Mar 04 2022 22:44:16 GMT+0000 (Coordinated Universal Time)] Promoted from node to master.
soketi-66bfb59674-wmnxg soketi {
soketi-66bfb59674-wmnxg soketi   isMaster: true,
soketi-66bfb59674-wmnxg soketi   isMasterEligible: true,
soketi-66bfb59674-wmnxg soketi   weight: -0.1646433855526,
soketi-66bfb59674-wmnxg soketi   address: '127.0.0.1',
soketi-66bfb59674-wmnxg soketi   advertisement: undefined
soketi-66bfb59674-wmnxg soketi }

Is it normal or a configuration issue on my side or a known issue? Message are not always broadcaster to client, depending on which node is connected the client.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.