# @upstash/redis auto-pipelining: batch with Promise.all, not await-per-line
Auto-pipelining collects your commands and sends them as one batched
request. It is enabled by default.
## The pattern that wastes it
const foo = await redis.get("foo"); // one PIPELINE call
const bar = await redis.get("bar"); // another PIPELINE call
Awaiting each command flushes the batch immediately, so you pay for two
HTTP requests and two billed commands with no batching benefit.
## The pattern that uses it
const [foo, bar] = await Promise.all([
redis.get("foo"),
redis.get("bar"),
]);
One PIPELINE call, results in order. Commands inside Promise.all run in
the order you wrote them.
## To disable
const redis = Redis.fromEnv({ enableAutoPipelining: false });
You might disable it when command ordering across awaits matters to
you, or when debugging and you want one request per command in logs.
## Why it matters on the edge
Vercel Edge and Cloudflare Workers limit simultaneous subrequests
(6 on Workers). Batching keeps you under that ceiling and cuts billed
commands per request. Fewer HTTP requests also means less latency
tail in serverless.