Code Monkey home page Code Monkey logo

kafka-traffic-system's Introduction

Kafka Traffic System

There are 2 client types: Producers & Consumers. Producers write to the data-stream (Topic), Consumers read from the stream. Based on the config settings, writes are replicated and can survive up to N failures in a cluster, where the cluster size is 2N + 1.


// Requirements for config.json 

```
{
    "rpc-ip-port": ":12345",
    "node-settings": {
        "heartbeat": 10000,
        "min-replicas": 3,
        "cluster-size": 5
    }
}
```

`cluster-size` is the number of nodes in a cluster *including* the leader. 
So if `cluster-size` is 3, there will be 1 Leader node and 2 Follower nodes.

`min-replicas` is the minimum number of nodes a Write must be replicated
on in order for a Write call to succeed. For our system, we assume
the number is at least a majority of Follower nodes. i.e. If `cluster-size`
is 5, there are 4 Follower nodes. `min-replicas` >= 3.
We allow users to set a number higher in order to guarantee better replication
for Writes. 

kafka-traffic-system's People

Contributors

floriecai avatar jtroo avatar ruimou avatar

Watchers

 avatar

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.