What Is TTFB? Why Indian Sites Score Poorly & How to Fix
What Is TTFB? Why Indian Sites Score Poorly & How to Fix
What is TTFB? Time to First Byte is the duration between a user's browser sending an HTTP request and receiving the very first byte of the response from your server. It is one of the most fundamental web performance metrics, and it directly impacts every other metric that follows — First Contentful Paint, Largest Contentful Paint, and ultimately, your Core Web Vitals score that Google uses for search ranking.
For Indian websites, TTFB is frequently a pain point. Run any Indian e-commerce site, government portal, or SaaS dashboard through Google PageSpeed Insights and you will likely see an orange or red TTFB score. This is not because Indian developers write slow code — it is because of infrastructure decisions, hosting choices, and architectural patterns that compound latency in ways that are unique to the Indian internet landscape.
This guide breaks down exactly what TTFB measures, why Indian websites struggle with it, and actionable steps you can take today to bring your TTFB under 200ms.
How TTFB Works: The Complete Breakdown
TTFB is not a single operation — it is the sum of multiple network and server-side steps. Understanding each component helps you diagnose where your latency is hiding.
┌──────────────────────────────────────────────────────────────────┐
│ TTFB Breakdown (Timeline) │
├──────────┬──────────┬──────────┬──────────────────┬─────────────┤
│ DNS │ TCP │ TLS │ Server │ First Byte │
│ Lookup │ Connect │ Handshk │ Processing │ Transfer │
│ │ │ │ │ │
│ 20-80ms │ 10-50ms │ 20-80ms │ 50-500ms+ │ 5-20ms │
│ │ │ │ │ │
│ Domain │ 3-way │ Cert │ App logic, │ Response │
│ → IP │ SYN/ACK │ exchange│ DB queries, │ starts │
│ resolve │ │ (TLS1.3)│ template render │ arriving │
└──────────┴──────────┴──────────┴──────────────────┴─────────────┘
Total TTFB = DNS + TCP + TLS + Server Processing + First Byte Transfer
Let us break down each component:
1. DNS Lookup (20–80ms)
Your browser needs to resolve your domain name (e.g., yourapp.in) to an IP address. This involves querying DNS resolvers — typically your ISP's DNS server (Jio, Airtel, BSNL) or a public resolver like Google (8.8.8.8) or Cloudflare (1.1.1.1).
Indian context: BSNL's DNS resolvers are notoriously slow, often adding 80–150ms to DNS lookups. Users on BSNL broadband in Tier-2 and Tier-3 cities experience significantly worse DNS resolution times than users on Jio or Airtel in metros.
2. TCP Connection (10–50ms)
After DNS resolution, the browser establishes a TCP connection to your server via a three-way handshake (SYN → SYN-ACK → ACK). The latency here is primarily determined by the physical distance between the user and your server.
Indian context: If your server is in AWS us-east-1 (Virginia), a TCP handshake from Mumbai adds approximately 180–220ms of round-trip latency. From AWS ap-south-1 (Mumbai), it drops to 10–30ms for users in western India.
3. TLS Handshake (20–80ms)
For HTTPS connections (which should be all connections in 2026), the browser and server negotiate encryption. TLS 1.3 reduces this to a single round trip, but TLS 1.2 requires two round trips.
Indian context: Many Indian government websites and older enterprise applications still run TLS 1.2, adding an extra round trip. If your hosting provider has not updated their TLS configuration, you are paying a latency tax on every single request.
4. Server Processing (50–500ms+)
This is where your application code runs — routing the request, querying the database, running business logic, rendering templates, and generating the response. This is often the largest component of TTFB and the one most directly under your control.
Indian context: Indian startups commonly use shared hosting or undersized VPS instances to save costs. A ₹500/month shared hosting plan that runs 50 other websites on the same server will have inconsistent server processing times, spiking to 2–3 seconds during peak hours.
5. First Byte Transfer (5–20ms)
The time taken for the first byte of the response to travel from your server to the user's browser. This is largely a function of network distance and quality.
What is a Good TTFB Score?
Google's guidelines and industry benchmarks define TTFB thresholds as:
| TTFB Range | Rating | What It Means |
|---|---|---|
| < 200ms | Good (Green) | Excellent server response, likely using CDN + optimized backend |
| 200–600ms | Needs Improvement (Orange) | Acceptable but room for optimization |
| > 600ms | Poor (Red) | Users perceive delay, SEO impact likely, high bounce risk |
For Indian websites serving Indian users from Indian hosting, a realistic target is under 300ms from BLR/Mumbai probe regions. If you can achieve under 200ms, you are in the top tier of Indian web performance.
Why Indian Websites Score Poorly on TTFB
Let us look at the specific reasons Indian websites consistently underperform on TTFB, based on data from thousands of checks run from PingSLA's BLR and Mumbai probe regions.
Reason 1: Server Location Mismatch
This is the single biggest contributor to poor TTFB for Indian websites. A surprising number of Indian startups host their applications in US or European regions:
| Hosting Decision | TTFB from Mumbai User | TTFB from BLR User |
|---|---|---|
| AWS us-east-1 (Virginia) | 380–500ms | 400–520ms |
| AWS eu-west-1 (Ireland) | 300–420ms | 320–440ms |
| AWS ap-southeast-1 (Singapore) | 120–180ms | 130–190ms |
| AWS ap-south-1 (Mumbai) | 30–80ms | 40–90ms |
| DigitalOcean BLR | 35–85ms | 20–60ms |
The difference between hosting in Virginia versus Mumbai is 300–400ms of pure network latency — before your application even starts processing the request. This alone can push your TTFB from green to red.
Fix: If your primary user base is in India, host in Mumbai (ap-south-1) or Bangalore. The marginal cost difference between regions is negligible. There is no good reason for an Indian B2C product to be hosted in the US.
Reason 2: No CDN or Misconfigured CDN
A CDN (Content Delivery Network) caches your static assets — and optionally your HTML pages — on edge servers close to your users. Without a CDN, every request travels all the way to your origin server.
Many Indian startups either do not use a CDN at all, or they use Cloudflare's free plan without enabling the optimizations that actually reduce TTFB:
- Argo Smart Routing (Cloudflare paid) — routes requests through Cloudflare's optimized backbone instead of the public internet
- Cache Everything page rule — caches HTML pages at the edge, not just static assets
- Early Hints (103) — sends preload hints before the full response is ready
Fix: At minimum, use Cloudflare's free tier with proper cache headers. For better results, configure your application to return appropriate Cache-Control headers and use stale-while-revalidate to serve cached content while refreshing in the background.
Reason 3: Unoptimized Database Queries
Slow database queries are the most common server-side cause of high TTFB. Indian startups in growth mode frequently have:
- Missing database indexes on frequently queried columns
- N+1 query patterns in ORM-heavy codebases (Prisma, Sequelize, Django ORM)
- No connection pooling, leading to new database connections on every request
- Single database instance serving both read and write traffic
Fix:
-- Find slow queries in PostgreSQL
SELECT query, mean_exec_time, calls
FROM pg_stat_statements
ORDER BY mean_exec_time DESC
LIMIT 20;
-- Add missing indexes
CREATE INDEX CONCURRENTLY idx_orders_user_id
ON orders (user_id)
WHERE status = 'active';
Use PgBouncer for connection pooling if you are on PostgreSQL. Add read replicas when your read:write ratio exceeds 10:1, which is common for dashboard-heavy SaaS products.
Reason 4: No Server-Side Caching
Every request that hits your database when it could have been served from cache is wasted TTFB. Common caching opportunities that Indian startups miss:
- Session data: Store in Redis instead of querying the database on every request
- User permissions/roles: Cache RBAC lookups for 5–10 minutes
- Configuration/feature flags: Cache in memory, refresh on a timer
- API responses: Cache GET responses with appropriate TTLs
- Rendered pages: Use full-page caching for marketing pages, documentation, pricing pages
// Example: Redis caching middleware for Express.js
const cacheMiddleware = async (req, res, next) => {
const key = `cache:${req.originalUrl}`;
const cached = await redis.get(key);
if (cached) {
return res.json(JSON.parse(cached));
}
res.sendResponse = res.json;
res.json = (body) => {
redis.setex(key, 300, JSON.stringify(body)); // Cache for 5 minutes
res.sendResponse(body);
};
next();
};
Reason 5: Heavy Server-Side Rendering Without Streaming
Next.js and Nuxt.js are popular choices in the Indian startup ecosystem. But SSR without streaming means the server must complete all data fetching and HTML rendering before sending any bytes to the client — resulting in high TTFB for data-heavy pages.
Fix: Use React Server Components with streaming (Next.js App Router) or implement renderToPipeableStream to start sending HTML to the browser while your data queries are still running. This dramatically reduces perceived TTFB because the browser receives the shell of the page immediately.
Reason 6: Shared Hosting and Undersized Servers
Budget constraints lead many Indian startups to use shared hosting (₹200–500/month) or the smallest VPS instances (1 vCPU, 1GB RAM). These work fine during development but collapse under production load:
- PHP applications on shared hosting compete with dozens of other sites for CPU
- Node.js applications on 1GB RAM instances hit memory pressure and trigger garbage collection pauses
- No swap space configured, leading to OOM kills during traffic spikes
Fix: For production workloads, the minimum viable server for an Indian startup is 2 vCPU / 4GB RAM. On DigitalOcean, this costs ₹1,600/month (~$19/month). On AWS, a t3.medium in ap-south-1 costs approximately ₹2,800/month with reserved pricing. This is not the place to cut costs.
How to Measure TTFB Accurately
Browser DevTools
Open Chrome DevTools → Network tab → click on your HTML document request → look at the "Waiting for server response" metric in the Timing tab. This is your TTFB as experienced by your browser on your current network.
Limitation: This measures TTFB from your specific location and network. It does not tell you what users in other cities experience.
Monitoring Tools
Use a monitoring service that measures TTFB from multiple Indian locations:
| Tool | India Probes | TTFB Tracking | Alerting | Cost |
|---|---|---|---|---|
| PingSLA | BLR, Mumbai | Yes (per-check) | WhatsApp, Slack, Email | From ₹2,499/mo |
| Google PageSpeed Insights | Limited | Yes (lab data) | No | Free |
| WebPageTest | No India location | Yes (detailed) | No | Free |
| GTmetrix | Mumbai | Yes | Email only | Free (limited) |
| Lighthouse CI | Your CI server | Yes | CI pipeline | Free |
PingSLA tracks TTFB on every uptime check from BLR and Mumbai probes — see our website monitoring guide for Indian startups for a complete setup walkthrough. You get a historical TTFB graph that shows trends, regressions, and the impact of your optimizations over time. If TTFB degrades beyond your threshold, you get a WhatsApp alert before users notice.
Command Line
# Measure TTFB with curl
curl -o /dev/null -s -w "DNS: %{time_namelookup}s\nTCP: %{time_connect}s\nTLS: %{time_appconnect}s\nTTFB: %{time_starttransfer}s\nTotal: %{time_total}s\n" https://yourapp.in
# Example output:
# DNS: 0.024s
# TCP: 0.048s
# TLS: 0.092s
# TTFB: 0.187s
# Total: 0.210s
This curl command breaks down each component so you can see exactly where your latency budget is being spent.
A Step-by-Step Plan to Fix TTFB for Indian Websites
Here is a prioritized action plan, ordered by impact and effort:
Quick Wins (Under 1 Hour)
-
Move to an Indian hosting region. If you are on AWS, switch to ap-south-1. If you are on DigitalOcean, switch to BLR. This alone can reduce TTFB by 200–400ms.
-
Enable Cloudflare with proper cache headers. Set
Cache-Control: public, max-age=3600, stale-while-revalidate=86400on static pages like your landing page, pricing, and docs. -
Upgrade TLS to 1.3. In your Nginx configuration:
ssl_protocols TLSv1.2 TLSv1.3;
ssl_prefer_server_ciphers off;
# Enable 0-RTT for returning visitors (TLS 1.3)
ssl_early_data on;
- Enable HTTP/2 (or HTTP/3). Multiplexed connections reduce the overhead of multiple requests.
Medium Effort (1–4 Hours)
-
Audit and optimize slow database queries. Use
pg_stat_statements(PostgreSQL) or the slow query log (MySQL) to find queries taking more than 100ms. Add indexes, eliminate N+1 patterns, and introduce connection pooling. -
Add Redis caching for session data, user permissions, and frequently-accessed configuration. A Redis instance on the same VPS or a managed Redis service (ElastiCache, DigitalOcean Managed Redis) typically responds in under 1ms.
-
Implement server-side response compression. Gzip or Brotli compression reduces the size of HTML/JSON responses by 60–80%, reducing transfer time.
# Nginx Brotli compression
brotli on;
brotli_comp_level 4;
brotli_types text/plain text/css application/json application/javascript text/xml;
Strategic Changes (1–2 Weeks)
-
Adopt edge computing for static and semi-static pages. Deploy your marketing site, documentation, and status page on Vercel, Cloudflare Pages, or Netlify. These platforms serve from edge nodes in Mumbai and other Indian cities, achieving TTFB under 50ms.
-
Implement streaming SSR if you use Next.js or React. Stream the HTML shell immediately while data-heavy components load asynchronously. This reduces perceived TTFB without changing your data fetching logic.
-
Set up continuous TTFB monitoring with PingSLA. Configure alerts for TTFB regression so you catch performance degradation in production before it compounds.
TTFB and SEO: The Indian Context
Google confirmed in 2023 that Core Web Vitals — which are directly influenced by TTFB — are a ranking signal. For Indian startups competing for Hindi and English search traffic, this matters:
- A website with 150ms TTFB and good Core Web Vitals will rank higher than an identical site with 800ms TTFB, all else being equal.
- Google's CrUX (Chrome User Experience Report) data is collected from real Chrome users in India. If your Indian users experience poor TTFB, it directly affects your CrUX data and your search rankings.
- Indian e-commerce keywords ("buy kurta online", "best credit card India") are highly competitive. Core Web Vitals often serve as the tiebreaker between equally relevant pages.
Companies like Nykaa, MakeMyTrip, and PolicyBazaar invest heavily in TTFB optimization because they understand that every 100ms of TTFB improvement translates to measurable revenue impact.
TTFB Benchmarks for Indian Industry Verticals
Based on aggregated data from PingSLA's BLR probe region, here is what good TTFB looks like for different types of Indian websites:
| Industry | Good TTFB | Typical TTFB | Common Issues |
|---|---|---|---|
| SaaS Dashboard | < 200ms | 300–600ms | Unoptimized API calls, no caching |
| E-commerce (Shopify India) | < 250ms | 400–800ms | App bloat, too many Shopify apps |
| Fintech | < 150ms | 200–400ms | Security middleware overhead |
| Government Portals | < 500ms | 1,500–5,000ms | Legacy infrastructure, no CDN |
| News / Media | < 100ms | 200–500ms | Ad scripts, no edge caching |
| EdTech | < 300ms | 500–1,200ms | Heavy video platform integrations |
| D2C Brands | < 200ms | 300–700ms | Unoptimized images, render-blocking JS |
Monitor TTFB Continuously, Not Just Once
The biggest mistake with TTFB optimization is treating it as a one-time exercise. TTFB regresses constantly — new features add database queries, new dependencies add latency, traffic growth strains server capacity, and hosting provider performance fluctuates.
Set up continuous TTFB monitoring with alerts:
- Track TTFB on every uptime check from BLR and Mumbai probes
- Set a threshold alert at 400ms — if your TTFB crosses this from an Indian probe, investigate immediately
- Review TTFB trends weekly in your engineering standup
- Correlate TTFB spikes with deployments to catch performance regressions early
PingSLA records TTFB on every check and lets you set performance-based alerts, not just availability alerts. You will know when your server response time degrades long before your users start complaining — or worse, leaving.
Good TTFB is not a luxury for Indian websites. It is the foundation of user experience, SEO ranking, and business performance. Measure it, fix it, and monitor it continuously.
Related reading: Learn how to monitor API endpoints to catch slow responses, or explore synthetic monitoring to simulate real user interactions and diagnose performance bottlenecks beyond TTFB.
Start monitoring free — no credit card required
Start Free →Monitor your site from 12 global regions →
Start Free →