Skip to content

An advanced MQTT server(broker) in Rust

License

Notifications You must be signed in to change notification settings

yangby-cryptape/akasa

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Akasa (आकाश)

CI

English | 简体中文

Akasa is a high performance, low latency and high extendable MQTT server in Rust.

The underlying MQTT protocol message codec (mqtt-proto) is carefully crafted for high performance and async environment.

Features

  • Full support MQTT v3.1/v3.1.1/v5.0
  • Support TLS (include two-way authentication)
  • Support WebSocket (include TLS support)
  • Support Proxy Protocol V2
  • Use a Hook trait to extend the server
  • Simple password file based authentication
  • Raft based cluster (coming soon)

How to Use

git clone https://github.com/akasamq/akasa.git && cd akasa
# You may also need to install openssl: https://docs.rs/openssl/latest/openssl/#automatic
cargo build --release

./target/release/akasa --help
# Commands:
#  start            Start the server
#  default-config   Generate default config to stdout
#  insert-password  Insert a password to the password file
#  remove-password  Remove a password from the password file
#  help             Print this message or the help of the given subcommand(s)

More documentation:

Benchmark

# Environment
CPU    : Intel® Xeon® E5-2678 v3 × 48
Memory : 32GB DDR4/2133
System : Arch Linux

# Players
FlashMQ : v1.6.9
  Akasa : v0.1.0 (tokio runtime)
   EMQX : v5.2.1
VerneMQ : v1.13.0

# Connections (clean_session=false)
FlashMQ : 250k connections, 0.9GB memory
  Akasa : 250k connections,   5GB memory
   EMQX : 250k connections,   5GB memory
VerneMQ :  50k connections,  20GB memory

# Message/s
FlashMQ : 40k coonections, 600k message/s, 0.6GB memory, CPU  550%
  Akasa : 40k connections, 600k message/s, 0.8GB memory, CPU  580%
   EMQX : 20k connections, 300k message/s, 3.2GB memory, CPU 3000%
VerneMQ : 25k connections, 370k message/s, 6.0GB memory, CPU 2600%

Testing

Testing is very important for reliable software. Akasa currently include 100 test cases, those test cases are collected by reading the specification and catch the functional points and limitations.

The underlying codec (mqtt-proto) also include significant amount of test cases and also some fuzz testing.

Community

If you have any questions or if you would like to get involved in our community, please check out:

License

Akasa is licensed under MIT license (LICENSE)

Enterprise Edition

Akasa will have an enterprise edition. In this edition, it provides:

  • WebAssembly based Rule Engine
    • can run very complex logic (such as TensorFlow)
    • very high performance compare to scripting language
    • hot reload
  • HTTP API to interact with Akasa
  • Statistics metrics
  • Rate limit
  • Data Integration (route message to MySQL/Kafka/InfluxDB...)

About

An advanced MQTT server(broker) in Rust

Resources

License

Stars

Watchers

Forks

Languages

  • Rust 100.0%