Back to work
Performance & BFF

BFF and Web Performance

A performance-focused solution combining optimized frontend delivery with backend data aggregation.

Role
Software Engineer
Company
Lowe's India
Period
2023 – Present
Node.jsExpress.jsReactRedisJavaSpring Boot

Overview

I combined a Node.js and Express backend-for-frontend (BFF) with frontend performance work to reduce API latency and improve page load. The BFF aggregated and normalized upstream data, while the frontend was optimized for faster, more efficient delivery.

Problem

The frontend was calling multiple upstream services directly, causing over-fetching, inconsistent response shapes, and slow page loads. At the same time, large bundles and heavy assets were hurting Core Web Vitals.

My role

I built the Node.js and Express BFF layer and drove the frontend performance work, applying caching, code-splitting, and asset optimization in collaboration with backend engineers.

Constraints

  • Legacy upstream APIs could not be changed quickly.
  • There were strict performance budgets for critical pages.
  • The BFF had to support multiple frontend surfaces.
  • Caching could not serve stale data in critical flows.

Architecture

The BFF sits between the client UI and upstream Java and Spring Boot services. It aggregates and normalizes responses, applies Redis caching, and exposes a single, stable contract to the frontend. This reduced round-trips and payload size while centralizing error handling and caching.

Technical decisions

BFF aggregation

A Node.js and Express BFF consolidated multiple upstream calls into one frontend request, reducing over-fetching and repeated transformation logic.

Redis caching

We added Redis caching for frequently read data to cut latency while keeping critical data fresh.

Frontend optimization

Code-splitting, lazy loading, and asset optimization reduced the initial bundle and improved Core Web Vitals.

Implementation

  • Built the Node.js and Express BFF layer to aggregate and normalize upstream services.
  • Added Redis caching and centralized error handling for reliability.
  • Optimized the frontend with code-splitting, lazy loading, and leaner assets.
  • Measured and validated improvements against performance budgets.

Trade-offs

BFF as a single point

A BFF centralizes data access, which is efficient but adds a service to operate and keep available.

Caching freshness

Caching improves latency but requires careful invalidation to avoid stale responses in critical flows.

Results

40% lower
API latency
Up to 45% better
Core Web Vitals

Lessons learned

  • A BFF reduces frontend complexity and improves performance when designed around clear contracts.
  • Measured performance budgets keep optimizations focused and durable.
  • Frontend and backend work together — the biggest wins came from optimizing both layers.