All Projects → erans → Redissnowflake

erans / Redissnowflake

Licence: mit
Twitter's Snowflake based ID generation as a redis module

Programming Languages

c
50402 projects - #5 most used programming language

Labels

Projects that are alternatives of or similar to Redissnowflake

SnowFlakeProject
All open source data of the snow flake project.
Stars: ✭ 37 (-43.94%)
Mutual labels:  snowflake
Naza
🍀 Go basic library. || Go语言基础库
Stars: ✭ 253 (+283.33%)
Mutual labels:  snowflake
Snowflake
❄️ A React-Native Android iOS Starter App/ BoilerPlate / Example with Redux, RN Router, & Jest with the Snowflake Hapi Server running locally or on RedHat OpenShift for the backend, or a Parse Server running locally or remotely on Heroku
Stars: ✭ 4,576 (+6833.33%)
Mutual labels:  snowflake
pre-commit-dbt
🎣 List of `pre-commit` hooks to ensure the quality of your `dbt` projects.
Stars: ✭ 149 (+125.76%)
Mutual labels:  snowflake
dbd
dbd is a database prototyping tool that enables data analysts and engineers to quickly load and transform data in SQL databases.
Stars: ✭ 30 (-54.55%)
Mutual labels:  snowflake
Snowflake
Twitter的分布式自增ID雪花算法snowflake (Java版)
Stars: ✭ 336 (+409.09%)
Mutual labels:  snowflake
carto-spatial-extension
A set of UDFs and Procedures to extend BigQuery, Snowflake, Redshift and Postgres with Spatial Analytics capabilities
Stars: ✭ 131 (+98.48%)
Mutual labels:  snowflake
Winterlayout
WinterLayout with the help of y = a*sin(x) function
Stars: ✭ 25 (-62.12%)
Mutual labels:  snowflake
tellery
Tellery lets you build metrics using SQL and bring them to your team. As easy as using a document. As powerful as a data modeling tool.
Stars: ✭ 219 (+231.82%)
Mutual labels:  snowflake
Neural
高并发、高可用的微服务架构中的分布式治理利刃,提供了分布式限流、服务降级、熔断器、重试器等容错特性,并提供了SPI、过滤器和JWT等功能。此外还提供了很多小的黑科技(如:IP黑白名单、UUID加强版、Snowflake和大并发时间戳获取等)。
Stars: ✭ 373 (+465.15%)
Mutual labels:  snowflake
monoton
Highly scalable, single/multi node, sortable, predictable and incremental unique id generator with zero allocation magic on the sequential generation
Stars: ✭ 21 (-68.18%)
Mutual labels:  snowflake
growthbook
Open Source Feature Flagging and A/B Testing Platform
Stars: ✭ 2,342 (+3448.48%)
Mutual labels:  snowflake
Mindsdb
Predictive AI layer for existing databases.
Stars: ✭ 4,199 (+6262.12%)
Mutual labels:  snowflake
tsid-creator
A Java library for generating Time Sortable Identifiers (TSID).
Stars: ✭ 16 (-75.76%)
Mutual labels:  snowflake
Idgen
Twitter Snowflake-alike ID generator for .Net
Stars: ✭ 581 (+780.3%)
Mutual labels:  snowflake
snowflake-starter
A _simple_ starter template for Snowflake Cloud Data Platform
Stars: ✭ 31 (-53.03%)
Mutual labels:  snowflake
Distributedid
基于twitter的雪花算法(SnowFlake)来产生分布式ID,支持SDK、HTTP方式接入
Stars: ✭ 273 (+313.64%)
Mutual labels:  snowflake
Tbls
tbls is a CI-Friendly tool for document a database, written in Go.
Stars: ✭ 940 (+1324.24%)
Mutual labels:  snowflake
Gonet
go分布式服务器,基于内存mmo
Stars: ✭ 804 (+1118.18%)
Mutual labels:  snowflake
Sqlpad
Web-based SQL editor run in your own private cloud. Supports MySQL, Postgres, SQL Server, Vertica, Crate, ClickHouse, Trino, Presto, SAP HANA, Cassandra, Snowflake, BigQuery, SQLite, and more with ODBC
Stars: ✭ 4,113 (+6131.82%)
Mutual labels:  snowflake

Redis Snowflake

Written by Eran Sandler (@erans)

This is a simple Redis module which generates unique IDs based on Twitter's Snowflake at high scale with some simple guarantees.

This Redis module wraps code from snowflaked made by Dwayn Matthies (dwayn). Thanks for the code Dwayn!

Some of Snowflake's benefits include:

  • Uncoordinated - For high availability within and across data centers, machines generating IDs should not have to coordinate with each other.

  • (Roughly) Time Ordered - it can guarantee that the ID numbers will be k-sorted (references: http://portal.acm.org/citation.cfm?id=70413.70419 and http://portal.acm.org/citation.cfm?id=110778.110783) within a reasonable bound (1 second is currently promised).

  • Directly Sortable - The IDs are sortable without loading the full objects that they represent, using the above order.

  • Compact - There are many otherwise reasonable solutions to this problem that require 128 bit numbers. For various reasons, we need to keep our IDs under 64 bits.

ID Composition

  • time - 41 bits (millisecond precision w/ a custom epoch gives us 69 years)
  • region_id - 4 bits - gives us 16 different region or data centers to work with
  • worker_id - 10 bits - gives us up to 1024 workers per region_id
  • sequence_id - 8 bits - gives us up to 256 IDs per worker in the same millisecond

Compilation

Just make it.

Usage

redis-server --loadmodule redissnowflake.so [region_id] [worker_id]

Example:

redis-server --loadmodule redissnowflake.so 1 1

If you require multiple such server/services in the same region, change the worker_id value.

If you require multiple such server/services in different regions, change the region_id value.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].