Evolution of Multi-Level Caching Architecture: From XML to Protobuf with LocalCache

This article details the evolution of caching architecture from XML-based caching to a multi-level caching system using Protobuf and LocalCache, achieving 70% improvement in API response times.

HomeTech
HomeTech
HomeTech
Evolution of Multi-Level Caching Architecture: From XML to Protobuf with LocalCache

This article details the evolution of caching architecture in a rapidly growing business environment, where increasing data complexity and user traffic necessitated multiple iterations of caching solutions. The author describes four major phases of caching development:

Phase 1: XML Format Data Caching (1.0) - Initially used for simple C# applications to reduce database I/O pressure and improve response speeds during traffic peaks.

Phase 2: XML and .Net DataTable Format Data Caching (2.0) - Added Redis as a caching layer to support multiple servers, improve data consistency, and address performance issues with XML serialization/deserialization.

Phase 3: Protobuf Format Data Caching (3.0) - Adopted Protocol Buffers for cross-platform, cross-language support, offering superior performance with binary storage that's 3-10x smaller and 20-100x faster than XML.

Phase 4: Protobuf with LocalCache Multi-Level Caching (4.0) - Implemented a two-tier system with Redis and LocalCache to handle high-frequency cache reads, reduce network I/O overhead, and prevent server overload during traffic spikes.

The article includes detailed diagrams showing cache architecture evolution, data synchronization processes, and implementation code examples in Java and Go. Performance testing showed a 70% improvement in API response times. The author concludes by discussing future plans for real-time data updates to further enhance user experience.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

redisProtobufLocalCachemulti-level caching
HomeTech
Written by

HomeTech

HomeTech tech sharing

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.