Tagged articles
Snowflake ID
14 articles · Page 1 of 1
This article explains how Snowflake IDs exceeding JavaScript's MAX_SAFE_INTEGER (2^53-1) lose precision when parsed as JSON numbers, causing silent bugs like 'record not found', and recommends returning IDs as strings via Jackson's ToStringSerializer or a custom @JsonId annotation, while keeping numeric fields as numbers, aligning API contracts, OpenAPI specs, and frontend types.
API DesignIEEE 754JSON Serialization
0 likes · 21 min read

An in‑depth MySQL benchmark compares auto‑increment, UUID, and Snowflake‑style random long keys, showing how index structure, insert latency, and page fragmentation differ, and explains why auto‑increment keys usually outperform the others while also highlighting the security and lock‑contention drawbacks of sequential IDs.
InnoDB indexMySQLPrimary Key
0 likes · 12 min read

The article catalogs six production‑ready pitfalls of MyBatis‑Plus—duplicate Snowflake IDs, batch‑insert disorder, enum storage errors, camel‑case mismatches, auto‑fill failures, and JSON field loss—explains their root causes with concrete examples and code, and provides practical solutions to keep the framework reliable in high‑concurrency environments.
Auto-fillEnum MappingJSON storage
0 likes · 16 min read

The article explains vertical and horizontal sharding concepts, compares their advantages and drawbacks, evaluates popular sharding middleware such as ShardingSphere, details distributed ID generation with Snowflake, offers cross‑database query solutions, and provides practical guidance on when and how to apply sharding in MySQL.
Cross-Database QueriesHorizontal ShardingMySQL
0 likes · 13 min read

This article experimentally compares auto‑increment, UUID and Snowflake‑generated primary keys in MySQL, analyzes their index structures, shows insertion‑time benchmarks, discusses the trade‑offs of each approach, and concludes that sequential auto‑increment keys deliver the best overall performance.
Index PerformanceInnoDBMySQL
0 likes · 10 min read

When a backend generates 19‑digit Snowflake IDs, JavaScript’s Number type truncates the trailing digits, causing add operations to work but delete or update actions to fail, and this article explains the root cause and four practical solutions.
AxiosBIGINTJavaScript
0 likes · 7 min read

An unexpected primary-key duplicate error in a low-traffic Spring Cloud app revealed that multiple servers shared the same Snowflake workId, causing ID collisions; the article explains Snowflake's structure, its pros and cons, and offers three practical methods—including IP-based calculation, environment variables, and middleware—to ensure globally unique workIds.
ID collisionMybatisPlusSnowflake ID
0 likes · 6 min read

The article explains why UUIDv4 primary keys hurt performance and storage, then demonstrates how to replace them in a Spring Boot 3.3 application with a custom Snowflake‑based 64‑bit ID generator, providing full Maven setup, configuration, entity, service, REST controller, and Thymeleaf UI example.
JavaMySQLSnowflake ID
0 likes · 17 min read

This article investigates MySQL's recommendation against using UUIDs as primary keys by creating three tables with auto‑increment, UUID, and random (snowflake) keys, running insertion benchmarks with Spring Boot/JdbcTemplate, analyzing index structures, and discussing the advantages and drawbacks of each key strategy.
MySQLPrimary KeySnowflake ID
0 likes · 11 min read

This article evaluates the insertion speed and index impact of three MySQL primary‑key strategies—auto‑increment, UUID, and Snowflake‑generated long IDs—by building identical tables, running a Spring Boot/JdbcTemplate benchmark, and analyzing the resulting performance and structural differences.
MySQLPrimary KeySnowflake ID
0 likes · 9 min read

This article explains how to avoid JavaScript precision loss when returning Snowflake IDs from a Laravel API by converting unsigned bigint IDs to strings using a custom Resource class, discusses a failed accessor attempt, and outlines performance and front‑end considerations.
APIBackendJavaScript Precision
0 likes · 5 min read

This article explains the principles of primary keys, compares auto‑increment IDs and GUIDs, introduces the Snowflake ID structure, discusses its benefits and drawbacks, and provides a complete .NET implementation using Redis for dynamic worker‑ID allocation, including handling clock rollback and code examples.
.NETC++Snowflake ID
0 likes · 17 min read

This article explains how to design a database architecture that can handle millions of daily active users and tens of thousands of concurrent requests by using multi‑server sharding, extensive table partitioning, read‑write separation, and distributed unique‑ID generation techniques such as Snowflake.
Read-Write SeparationSnowflake IDdatabase sharding
0 likes · 20 min read

The article details the Jingmai Message Center’s end‑to‑end architecture, covering message ingestion via Anycall and MQ, protocol conversion, Netty‑based push system, Snowflake ID generation, Elasticsearch storage, multi‑level caching, distributed locking, and the overall design principles that enable a scalable, reliable messaging platform.
CachingNettySnowflake ID
0 likes · 9 min read
