Click Below to Get the Code

Browse, clone, and build from real-world templates powered by Harper.
Blog
GitHub Logo

Distributed Cache: Stretch Your Memory

Kyle describes the benefits of using distributed cache to lower costs and improve performance.
Blog

Distributed Cache: Stretch Your Memory

Kyle Bernhardy
CTO & Co-Founder
at Harper
February 12, 2018
Kyle Bernhardy
CTO & Co-Founder
at Harper
February 12, 2018
Kyle Bernhardy
CTO & Co-Founder
at Harper
February 12, 2018
February 12, 2018
Kyle describes the benefits of using distributed cache to lower costs and improve performance.
Kyle Bernhardy
CTO & Co-Founder

Data drives our lives. Our apps, our spending, our home, it’s all driven from a datastore somewhere. On the scale that we constantly ask questions of our devices we might wonder, just how are these systems keeping up with the sheer scale of all the constant data requests being delivered to our brains?  NoSQL databases are built to horizontally scale natively as can some relational databases.  Monolithic databases are of course a thing that happens. Both of these options can work but the cost of this type of scale surrounding databases can be staggering and keeping it all alive can make a seasoned DevOps shudder. The answer to this question of scale is memory and caching. 

In many applications, data retrieved from data stores does not change rapidly so it makes sense to cache the response from a database to be utilized at a later time.  This helps rapidly improve performance and keep infrastructure costs down.  Or, it could be that your app needs to query results from your data warehouse, which only gets refreshed nightly.  In this case the data will not change throughout the day and it is safe to cache this data for easy retrieval. Another application mechanism for caching is memoization, this allows for caching the results of complex function calls. 

Your Database Remembers

Many databases have internalized these caching needs by either being in-memory natively, having an in-memory cache or the ability to simulate in-memory with potentially limited features.  The spectrum that this solution has been met is broad.  There are simple key value stores aplenty in this space as well as complex relational databases that offer in-memory caching.  The benefit is it offloads the need to design a caching mechanism on the app side.  The downside is data size can exceed the memory footprint available to the database server creating out of memory exceptions on a critical part of your infrastructure.  

Caching the Internet

A few months ago, Stephen discussed the potential end of net neutrality. In the scenario of a peer to peer internet what will facilitate the transfer of data is an Information-centric Network (ICN). No longer would there be a host-centric network, but rather a series of nodes with caches of data where the client is routed based on the information required. Currently, when a request is sent across the internet you are routed ultimately to an IP address. In an ICN architecture the information needed points you to nodes that house data related to the request. A distribution of caches in this framework allows for failover and replication of information enabling high scalability and reliability. Simply hitting data stores over and over again is effective, but inefficient. Bludgeoning a database for frequently polled data can cause row locks, connection issues, and force costs to soar to keep up for inefficient design patterns.  As is always found, systems on scale require finesse and solutions that maximize the potential of the hardware.  Leveraging memory caching, whether thru your own application or from an in memory database can utilize resources already available to you and enable you to do more with less.

Data drives our lives. Our apps, our spending, our home, it’s all driven from a datastore somewhere. On the scale that we constantly ask questions of our devices we might wonder, just how are these systems keeping up with the sheer scale of all the constant data requests being delivered to our brains?  NoSQL databases are built to horizontally scale natively as can some relational databases.  Monolithic databases are of course a thing that happens. Both of these options can work but the cost of this type of scale surrounding databases can be staggering and keeping it all alive can make a seasoned DevOps shudder. The answer to this question of scale is memory and caching. 

In many applications, data retrieved from data stores does not change rapidly so it makes sense to cache the response from a database to be utilized at a later time.  This helps rapidly improve performance and keep infrastructure costs down.  Or, it could be that your app needs to query results from your data warehouse, which only gets refreshed nightly.  In this case the data will not change throughout the day and it is safe to cache this data for easy retrieval. Another application mechanism for caching is memoization, this allows for caching the results of complex function calls. 

Your Database Remembers

Many databases have internalized these caching needs by either being in-memory natively, having an in-memory cache or the ability to simulate in-memory with potentially limited features.  The spectrum that this solution has been met is broad.  There are simple key value stores aplenty in this space as well as complex relational databases that offer in-memory caching.  The benefit is it offloads the need to design a caching mechanism on the app side.  The downside is data size can exceed the memory footprint available to the database server creating out of memory exceptions on a critical part of your infrastructure.  

Caching the Internet

A few months ago, Stephen discussed the potential end of net neutrality. In the scenario of a peer to peer internet what will facilitate the transfer of data is an Information-centric Network (ICN). No longer would there be a host-centric network, but rather a series of nodes with caches of data where the client is routed based on the information required. Currently, when a request is sent across the internet you are routed ultimately to an IP address. In an ICN architecture the information needed points you to nodes that house data related to the request. A distribution of caches in this framework allows for failover and replication of information enabling high scalability and reliability. Simply hitting data stores over and over again is effective, but inefficient. Bludgeoning a database for frequently polled data can cause row locks, connection issues, and force costs to soar to keep up for inefficient design patterns.  As is always found, systems on scale require finesse and solutions that maximize the potential of the hardware.  Leveraging memory caching, whether thru your own application or from an in memory database can utilize resources already available to you and enable you to do more with less.

Kyle describes the benefits of using distributed cache to lower costs and improve performance.

Download

White arrow pointing right
Kyle describes the benefits of using distributed cache to lower costs and improve performance.

Download

White arrow pointing right
Kyle describes the benefits of using distributed cache to lower costs and improve performance.

Download

White arrow pointing right

Explore Recent Resources

Blog
GitHub Logo

How a Shopify Custom Tie Shop Exposes a Common Flaw in Agent Architecture

Explore how a Shopify-based custom tie shop reveals a critical flaw in one LLM agent design strategy, and why context-first architectures with unified runtimes deliver faster, more accurate, and scalable customer support automation.
Blog
Explore how a Shopify-based custom tie shop reveals a critical flaw in one LLM agent design strategy, and why context-first architectures with unified runtimes deliver faster, more accurate, and scalable customer support automation.
Person with short dark hair and moustache, wearing a colorful plaid shirt, smiling outdoors in a forested mountain landscape.
Aleks Haugom
Senior Manager of GTM & Marketing
Blog

How a Shopify Custom Tie Shop Exposes a Common Flaw in Agent Architecture

Explore how a Shopify-based custom tie shop reveals a critical flaw in one LLM agent design strategy, and why context-first architectures with unified runtimes deliver faster, more accurate, and scalable customer support automation.
Aleks Haugom
Apr 2026
Blog

How a Shopify Custom Tie Shop Exposes a Common Flaw in Agent Architecture

Explore how a Shopify-based custom tie shop reveals a critical flaw in one LLM agent design strategy, and why context-first architectures with unified runtimes deliver faster, more accurate, and scalable customer support automation.
Aleks Haugom
Blog

How a Shopify Custom Tie Shop Exposes a Common Flaw in Agent Architecture

Explore how a Shopify-based custom tie shop reveals a critical flaw in one LLM agent design strategy, and why context-first architectures with unified runtimes deliver faster, more accurate, and scalable customer support automation.
Aleks Haugom
Blog
GitHub Logo

Nobody Wants to Pick a Data Center (And They Shouldn't Have To)

Harper Fabric simplifies cloud deployment by eliminating the need to choose data centers, automating infrastructure, scaling, and global distribution. Built for Harper’s unified runtime, it enables developers to deploy high-performance, distributed applications quickly without managing complex cloud configurations or infrastructure overhead.
Blog
Harper Fabric simplifies cloud deployment by eliminating the need to choose data centers, automating infrastructure, scaling, and global distribution. Built for Harper’s unified runtime, it enables developers to deploy high-performance, distributed applications quickly without managing complex cloud configurations or infrastructure overhead.
Headshot of a smiling woman with shoulder-length dark hair wearing a black sweater with white stripes and a gold pendant necklace, standing outdoors with blurred trees and mountains in the background.
Bari Jay
Senior Director of Product Management
Blog

Nobody Wants to Pick a Data Center (And They Shouldn't Have To)

Harper Fabric simplifies cloud deployment by eliminating the need to choose data centers, automating infrastructure, scaling, and global distribution. Built for Harper’s unified runtime, it enables developers to deploy high-performance, distributed applications quickly without managing complex cloud configurations or infrastructure overhead.
Bari Jay
Apr 2026
Blog

Nobody Wants to Pick a Data Center (And They Shouldn't Have To)

Harper Fabric simplifies cloud deployment by eliminating the need to choose data centers, automating infrastructure, scaling, and global distribution. Built for Harper’s unified runtime, it enables developers to deploy high-performance, distributed applications quickly without managing complex cloud configurations or infrastructure overhead.
Bari Jay
Blog

Nobody Wants to Pick a Data Center (And They Shouldn't Have To)

Harper Fabric simplifies cloud deployment by eliminating the need to choose data centers, automating infrastructure, scaling, and global distribution. Built for Harper’s unified runtime, it enables developers to deploy high-performance, distributed applications quickly without managing complex cloud configurations or infrastructure overhead.
Bari Jay
Blog
GitHub Logo

New RocksDB Binding for Node.js

rocksdb-js is a modern Node.js binding for RocksDB, offering full transaction support, lazy range queries, and a TypeScript API. Built for performance and scalability, it enables reliable write-heavy workloads, real-time replication, and high-concurrency applications in Harper 5.0 and beyond.
Blog
rocksdb-js is a modern Node.js binding for RocksDB, offering full transaction support, lazy range queries, and a TypeScript API. Built for performance and scalability, it enables reliable write-heavy workloads, real-time replication, and high-concurrency applications in Harper 5.0 and beyond.
Person with short hair and rectangular glasses wearing a plaid shirt over a dark T‑shirt, smiling broadly with a blurred outdoor background of trees and hills.
Chris Barber
Staff Software Engineer
Blog

New RocksDB Binding for Node.js

rocksdb-js is a modern Node.js binding for RocksDB, offering full transaction support, lazy range queries, and a TypeScript API. Built for performance and scalability, it enables reliable write-heavy workloads, real-time replication, and high-concurrency applications in Harper 5.0 and beyond.
Chris Barber
Apr 2026
Blog

New RocksDB Binding for Node.js

rocksdb-js is a modern Node.js binding for RocksDB, offering full transaction support, lazy range queries, and a TypeScript API. Built for performance and scalability, it enables reliable write-heavy workloads, real-time replication, and high-concurrency applications in Harper 5.0 and beyond.
Chris Barber
Blog

New RocksDB Binding for Node.js

rocksdb-js is a modern Node.js binding for RocksDB, offering full transaction support, lazy range queries, and a TypeScript API. Built for performance and scalability, it enables reliable write-heavy workloads, real-time replication, and high-concurrency applications in Harper 5.0 and beyond.
Chris Barber
Blog
GitHub Logo

Open Sourcing Harper

Harper is now open source, with its core platform released under Apache 2.0 and enterprise features source-available. This shift builds trust, enables community contributions, and positions Harper as a unified, transparent platform for developers and AI-driven applications.
Blog
Harper is now open source, with its core platform released under Apache 2.0 and enterprise features source-available. This shift builds trust, enables community contributions, and positions Harper as a unified, transparent platform for developers and AI-driven applications.
Person with shoulder‑length curly brown hair and light beard wearing a gray long‑sleeve shirt, smiling outdoors with trees and greenery in the background.
Ethan Arrowood
Senior Software Engineer
Blog

Open Sourcing Harper

Harper is now open source, with its core platform released under Apache 2.0 and enterprise features source-available. This shift builds trust, enables community contributions, and positions Harper as a unified, transparent platform for developers and AI-driven applications.
Ethan Arrowood
Apr 2026
Blog

Open Sourcing Harper

Harper is now open source, with its core platform released under Apache 2.0 and enterprise features source-available. This shift builds trust, enables community contributions, and positions Harper as a unified, transparent platform for developers and AI-driven applications.
Ethan Arrowood
Blog

Open Sourcing Harper

Harper is now open source, with its core platform released under Apache 2.0 and enterprise features source-available. This shift builds trust, enables community contributions, and positions Harper as a unified, transparent platform for developers and AI-driven applications.
Ethan Arrowood
Blog
GitHub Logo

The Resource API in Harper v5: HTTP Done Right

Harper v5's Resource API maps JavaScript class methods directly to HTTP verbs, eliminating routing and translation layers. Tables extend the same Resource class, unifying HTTP handling and data access into one interface. Key v5 additions include pre-parsed RequestTarget objects, Response-aware source caching with stale-while-revalidate support, and async context tracking via getContext().
Product Update
Blog
Harper v5's Resource API maps JavaScript class methods directly to HTTP verbs, eliminating routing and translation layers. Tables extend the same Resource class, unifying HTTP handling and data access into one interface. Key v5 additions include pre-parsed RequestTarget objects, Response-aware source caching with stale-while-revalidate support, and async context tracking via getContext().
Person with very short blonde hair wearing a light gray button‑up shirt, standing with arms crossed and smiling outdoors with foliage behind.
Kris Zyp
SVP of Engineering
Blog

The Resource API in Harper v5: HTTP Done Right

Harper v5's Resource API maps JavaScript class methods directly to HTTP verbs, eliminating routing and translation layers. Tables extend the same Resource class, unifying HTTP handling and data access into one interface. Key v5 additions include pre-parsed RequestTarget objects, Response-aware source caching with stale-while-revalidate support, and async context tracking via getContext().
Kris Zyp
Apr 2026
Blog

The Resource API in Harper v5: HTTP Done Right

Harper v5's Resource API maps JavaScript class methods directly to HTTP verbs, eliminating routing and translation layers. Tables extend the same Resource class, unifying HTTP handling and data access into one interface. Key v5 additions include pre-parsed RequestTarget objects, Response-aware source caching with stale-while-revalidate support, and async context tracking via getContext().
Kris Zyp
Blog

The Resource API in Harper v5: HTTP Done Right

Harper v5's Resource API maps JavaScript class methods directly to HTTP verbs, eliminating routing and translation layers. Tables extend the same Resource class, unifying HTTP handling and data access into one interface. Key v5 additions include pre-parsed RequestTarget objects, Response-aware source caching with stale-while-revalidate support, and async context tracking via getContext().
Kris Zyp
News
GitHub Logo

Harper 5.0 Is Here: Open Source, RocksDB, and a Runtime Built for the Agentic Era

Harper 5.0 launches with a fully open-source core under Apache 2.0, RocksDB as a native storage engine alongside LMDB, and source-available Harper Pro. This release delivers a unified runtime purpose-built for agentic engineering, from prototype to production.
Product Update
News
Harper 5.0 launches with a fully open-source core under Apache 2.0, RocksDB as a native storage engine alongside LMDB, and source-available Harper Pro. This release delivers a unified runtime purpose-built for agentic engineering, from prototype to production.
Person with short dark hair and moustache, wearing a colorful plaid shirt, smiling outdoors in a forested mountain landscape.
Aleks Haugom
Senior Manager of GTM & Marketing
News

Harper 5.0 Is Here: Open Source, RocksDB, and a Runtime Built for the Agentic Era

Harper 5.0 launches with a fully open-source core under Apache 2.0, RocksDB as a native storage engine alongside LMDB, and source-available Harper Pro. This release delivers a unified runtime purpose-built for agentic engineering, from prototype to production.
Aleks Haugom
Apr 2026
News

Harper 5.0 Is Here: Open Source, RocksDB, and a Runtime Built for the Agentic Era

Harper 5.0 launches with a fully open-source core under Apache 2.0, RocksDB as a native storage engine alongside LMDB, and source-available Harper Pro. This release delivers a unified runtime purpose-built for agentic engineering, from prototype to production.
Aleks Haugom
News

Harper 5.0 Is Here: Open Source, RocksDB, and a Runtime Built for the Agentic Era

Harper 5.0 launches with a fully open-source core under Apache 2.0, RocksDB as a native storage engine alongside LMDB, and source-available Harper Pro. This release delivers a unified runtime purpose-built for agentic engineering, from prototype to production.
Aleks Haugom