Upstash Redis vs Momento Cache: Rate Limits, Latency, and True Serverless Costs

May 27, 2026 6 min read 44 views
Abstract illustration of two serverless cache nodes exchanging data streams on a minimal gradient background

You're building a serverless API and you need a fast, low-ops cache. You've narrowed it down to Upstash Redis and Momento Cache β€” two services that both promise "true serverless" pricing. But the details matter, and the gap between them is wider than their marketing pages suggest.

This article cuts through the surface-level comparisons. We'll look at how each service actually behaves under real workloads: what the rate limits mean in practice, where latency comes from, and how to estimate what you'll actually pay.

  • How Upstash and Momento differ in their core architecture
  • What rate limits each platform enforces and how they affect throughput
  • Latency characteristics and what drives cold-start behavior
  • A real cost comparison across three common workload shapes
  • When to pick one over the other

The Core Architecture Difference

Upstash Redis is Redis. It exposes the Redis API β€” commands like GET, SET, HSET, ZADD β€” over an HTTP REST interface alongside the standard TCP connection. You get full Redis semantics: data structures, TTLs, pub/sub, Lua scripting. The serverless angle is the pricing model and the managed infrastructure, not a fundamental reimagining of the protocol.

Momento Cache is purpose-built for serverless. It has no persistent connection requirement, no Redis compatibility layer, and a simplified API focused on cache-get and cache-set patterns. The tradeoff is that you lose advanced Redis data structures, but you gain a service that was designed from the start around stateless, bursty, HTTP-native access patterns.

This architectural difference is the root cause of most of the practical differences below.

Setting Up Both Services

Both services take under ten minutes to get a working connection. Here's what a basic read/write looks like in each.

Upstash Redis (Node.js)

import { Redis } from "@upstash/redis";

const redis = new Redis({
  url: process.env.UPSTASH_REDIS_REST_URL,
  token: process.env.UPSTASH_REDIS_REST_TOKEN,
});

await redis.set("user:42", JSON.stringify({ name: "Ada" }), { ex: 300 });
const user = await redis.get("user:42");
console.log(user);

Momento Cache (Node.js)

import {
  CacheClient,
  Configurations,
  CredentialProvider,
  CacheGetStatus,
} from "@gomomento/sdk";

const client = await CacheClient.create({
  configuration: Configurations.Laptop.v1(),
  credentialProvider: CredentialProvider.fromEnvironmentVariable("MOMENTO_AUTH_TOKEN"),
  defaultTtlSeconds: 300,
});

await client.set("my-cache", "user:42", JSON.stringify({ name: "Ada" }));
const response = await client.get("my-cache", "user:42");
if (response.status === CacheGetStatus.Hit) {
  console.log(response.value());
}

Momento's API is more verbose at initialization but the response model is explicit about hit/miss/error status, which reduces the chance of silently treating a cache miss as a null value.

Rate Limits: What the Plans Actually Enforce

This is where many developers get caught off guard. Both services have free tiers, but the shape of their limits is very different.

Upstash Redis on the free tier caps you at 10,000 commands per day on a shared database. On the pay-as-you-go plan, there's no daily command cap, but there is a per-database bandwidth limit and a maximum request rate tied to your database's region and plan tier. Upstash also enforces a maximum concurrent connection limit that varies by plan. If your Lambda functions fan out and open many simultaneous TCP connections, you can hit this ceiling before you hit any bandwidth limit.

Momento Cache on the free tier gives you a monthly request allowance that resets on a calendar basis rather than a daily cap β€” which is more forgiving for bursty workloads. On paid plans, Momento's primary rate limit is requests per second per cache, and it's configurable on request. The default soft limit is generous enough that most applications never trigger it organically.

Limit typeUpstash (free)Momento (free)
Request cap10,000 / day~50 GB transfer / month
Max item size1 MB1 MB
Concurrent connectionsLimited by planNot applicable (HTTP)
Max databases / caches1 on free tierMultiple caches allowed

The concurrent connection limit on Upstash is the one that bites serverless teams hardest. When a Lambda function auto-scales to 200 instances and each opens a TCP Redis connection, you can exhaust connections even at modest traffic. Using the REST/HTTP interface instead of the native Redis client sidesteps this, but you give up pipeline batching and slightly increase per-command overhead.

Latency: Numbers and What Drives Them

Both services can serve cache hits in low single-digit milliseconds when the request originates from the same cloud region. The variation comes from a few factors worth understanding.

Cold start on HTTP clients is the main latency source for serverless functions. When your Lambda hasn't run recently, the TLS handshake to either service adds latency on the first request. Upstash and Momento both support HTTP/2 keep-alive, but in a true cold Lambda invocation you'll pay the connection setup cost regardless. This is typically in the 30–80ms range on top of the cache RTT and is not specific to either vendor.

Regional placement matters more than vendor. If your Lambda is in us-east-1 and your cache is in eu-west-1, you will see cross-region latency of 80–120ms. Both services support multiple regions; always co-locate your cache with your compute.

Momento has an edge in that its service is designed exclusively for HTTP access, so there is no protocol translation layer between the HTTP gateway and the storage backend. Upstash translates incoming HTTP REST calls into native Redis operations internally. In practice the difference is single-digit milliseconds at best and is rarely meaningful unless you are chasing tail latency on p99 SLAs.

For typical API caching use cases β€” storing serialized query results, session tokens, or feature flags β€” you will not notice a difference in latency between the two in the same region.

Pricing: Three Workload Shapes

Both services charge on reads and writes. The units differ slightly: Upstash charges per 100,000 commands, while Momento charges per GB of data transferred. This makes direct comparison require some arithmetic based on your average item size.

Assume an average cached item is 2 KB. Here's the math across three workloads.

Low-traffic side project (100,000 requests/month)

At 100K requests and 2 KB per item, you transfer roughly 200 MB of data. Both services cover this comfortably on their free tiers. Neither costs anything. The main difference is that Upstash's daily cap means if you spike all 100K requests in a single day, you'll hit the free limit and either pay overage or get throttled.

Mid-scale API (5 million requests/month)

At 5M requests and 2 KB per item, you're looking at about 10 GB transferred. Upstash bills per command at its standard rate; 5M commands puts you in a predictable, low monthly cost. Momento bills on data transfer, so 10 GB also lands in a similar low cost range. Both should come in well under $10/month at this scale.

High-throughput service (200 million requests/month)

This is where the pricing models diverge noticeably. At 200M requests, Upstash's per-command pricing compounds linearly. Momento's per-GB pricing depends heavily on item size: if your items are small (under 1 KB), you're paying for fewer bytes even with the same request count. If your items are large (10+ KB), Momento becomes more expensive. At this scale, both services are competitive but you should run the numbers specific to your payload size.

The most important pricing variable is your average item size. Small items favor Momento's data-transfer model; command-heavy, small-value workloads (like rate-limiting counters) favor Upstash's per-command model because the byte cost is tiny.

Data Structures and Use Cases

If you need anything beyond simple key-value caching, Upstash wins by default. Redis sorted sets for leaderboards, hashes for structured records, lists for queues, and bitmaps for analytics are all available. You don't need to re-implement these in application code.

Momento offers sorted sets and dictionaries in addition to basic string values, but the breadth of operations is narrower than Redis. If your use case is caching API responses, storing session data, or implementing a simple rate limiter, Momento's feature set is sufficient. If you need pub/sub, Lua scripting, or geospatial indexes, you need Upstash.

Common Pitfalls

Using TCP Redis clients in serverless. The ioredis or redis npm packages open persistent TCP connections. In Lambda, this causes connection exhaustion at scale. Always use the Upstash HTTP client (@upstash/redis) in serverless environments.

Ignoring TTL on every write. Serverless caches are not databases. If you SET without an expiry, items persist indefinitely and you accumulate storage costs. Set a TTL on every write, even if it's a long one.

Cold start latency misattribution. Developers sometimes blame the cache vendor when they see 200ms on the first request. Almost always this is Lambda cold start plus TLS setup, not cache latency. Measure cache RTT from a warm function before blaming the vendor.

Cross-region deployments. Running your cache in a different region from your compute for

πŸ“€ Share this article

Sign in to save

Comments (0)

No comments yet. Be the first!

Leave a Comment

Sign in to comment with your profile.

πŸ“¬ Weekly Newsletter

Stay ahead of the curve

Get the best programming tutorials, data analytics tips, and tool reviews delivered to your inbox every week.

No spam. Unsubscribe anytime.