Last Modified: 2017-06-28
Leaf-snowflake is a distributed,monotonic increase long-type integer ID maker.
Support nearly 1000+ leaf-snowflake servers to provide id services simultaneously.
Based on http://tech.meituan.com/MT_Leaf.html leaf-snowflake.
- mvn package
- Set ${LEAF_HOME} environment variable
- Config leaf.yaml at ${LEAF_HOME}/conf
- Exec ${LEAF_HOME}/bin/start.sh
- Communicate to the RPC server and get the unique , monotonic increase ID like startClient() in /rpc/rpcClient.java shows,just for test!
-
List the content of a znode dir:
/bin/leaf.py zktool list /leaf/server-forever
-
Read the content of a znode:
/bin/leaf.py zktool read /leaf/server-forever/172.21.0.190:2182-0000000008
Cost 191 seconds with 200W absolutely monotonic increase Ids generated.
TPS: 1W+/sec for a single machine
weizhenyi Github: https://github.com/weizhenyi
Email: zhenyiwei1986@126.com QQ:632155186