GithubHelp home page GithubHelp logo

davidsbond / arrebato Goto Github PK

View Code? Open in Web Editor NEW
9.0 9.0 1.0 1.29 MB

A gRPC based pub/sub messaging system

License: Apache License 2.0

Dockerfile 0.08% Makefile 0.88% Go 98.91% Shell 0.13%
grpc pubsub signing spiffe

arrebato's People

Contributors

davidsbond avatar dependabot[bot] avatar github-actions[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

lhaig

arrebato's Issues

Audit TLS things

Right now, TLS should work between clients and between raft members with mutual TLS and SPIFFE identities.

Ideally, this should be reviewed over by someone with more knowledge than me on the subject to make sure everything is above board and correct. Then documentation around creating a secure deployment should be made.

If the helm chart already exists from #82 it should also be updated to support all the TLS goodness, preferably with cert manager's CSI driver which seems ideal for this use-case.

Allow multiple consumers of the same topic to work in tandem

Right now, a single consumer works in isolation against a topic. Ideally, we should try and come up with a system where multiple instances of the same consumer can work together to get through a topic quicker. Similar to Kafka's consumer groups.

Below is an approach that could be taken:

  1. Assign topics to individual members of the raft quorum and only allow consumers of that topic to get it from that server. For this, we'd probably need additional raft commands when nodes join/leave and commands for assigning topics to nodes. When a server leaves, the topics should be redistributed among the remaining nodes.
  2. Advertise the topics available on the describe node call so that clients know where to go
  3. Per consumer id/topic combination, have a channel that fans out to all consumers of that topic that share a consumer id
  4. Use a hashing algorithm (like crc32) so that messages that share a key are always delivered to the same consumer in the group. This is important for message ordering. Blindly distributing messages among all the consumers could lead to messages being processed out of order

Refactor client logic

Currently, the client works by providing a list of server addresses. Each server is checked to see if it is the leader node or not. If an API call returns a FAILED_PRECONDITION grpc code then the client attempts to find the leader again and retries the request.

This is a bit flaky and error prone. For example, if full leadership is lost this will infinite loop and probably cause a stack overflow.

The client logic for handling this needs to be better and more robust. Potential ideas:

  1. Have clients also use serf. When they connect via serf they indicate via tags that they're a client and not a server. This way, the server does not attempt to add them to the cluster. The client will then receive events as servers are added and removed. With this, the client need only know about one server, and automagically get information on all the other available servers. Every time a server is added or removed, recheck the leadership. When the client makes API requests to the wrong server, just propagate that upwards as it should be very unlikely to occur and the client can manually retry.
  2. ...

Create helm chart for Kubernetes deployments

Currently, the project only provides a kustomize manifest.

  1. This isn't particularly useful for customising deployments, you can't template much. So you end up having to do manual changes if you want to use the cert-manager CSI driver for TLS.
  2. It's easy to forget to change the image version before you tag a release

Ideally, we should have a helm chart and a CI process that ensures the image version is correct. We can also use helm template in the CI process to produce static manifests for anyone that wants a one-liner.

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.