Skip to content
Julien Vermillard edited this page Feb 11, 2016 · 15 revisions

Leshan Cluster

TL;DR:

Today a Leshan server cannot be easily deployed in a cluster for high-availability and scalability. This page list the modification to be done to Leshan and Californium and propose an example on how to deploy Leshan as a cluster. We will focus on the southbound interface: the device to server communication (CoAP).

Load-Balancer

If we deploy Leshan as mutiple machine we need a front load balancer for sending the incoming messages to one of the cluster Leshan instance.

Today Leshan accept CoAP+DTLS device communications. It's all based on UDP (maybe later TCP). One of the few load-balancer supporting UDP is LVS - Linux Virtual Server. We will focus on providing a solution compatible with it. (Please if you know another Level 3 load-balancer usable in this situation please mention it!). We don't explore DNS round robin load balancing, because the amount of state to share would be larger (whole DTLS states). We prefer level 3 source IP/port based routing.

Proposed network infrastructure

States

  • A DTLS connection contains a lot of states (fragment, epoch, handshake states, master key etc..)
  • CoAP states: MID, tokens
  • LWM2M: registrations, security parameters, observations