Facebook Instagram Twitter Vimeo Youtube
Sign in
  • Home
  • About
  • Team
  • Buy now!
Sign in
Welcome!Log into your account
Forgot your password?
Privacy Policy
Password recovery
Recover your password
Search
Logo
Sign in
Welcome! Log into your account
Forgot your password? Get help
Privacy Policy
Password recovery
Recover your password
A password will be e-mailed to you.
Thursday, September 4, 2025
Sign in / Join
  • Contact Us
  • Our Team
Facebook
Instagram
Twitter
Vimeo
Youtube
Logo
  • Home
  • News
    • News

      Anthropic Confirms Claude AI Was Weaponized in Major Cyberattacks by Husain Parvez

      3 September 2025
      News

      Over 30,000 Malicious IPs Target Microsoft Remote Desktop in Global Surge by Husain Parvez

      31 August 2025
      News

      Cyber Threat-Sharing Law Nears Expiration: Experts Warn of Risks by Husain Parvez

      31 August 2025
      News

      North Korean Hacking Tools Leak Online, Including Advanced Linux Rootkit by Paige Henley

      28 August 2025
      News

      iiNet Cyberattack Exposes Data of 280,000 Customers by Husain Parvez

      28 August 2025
  • Data Modelling & AI
    • AllBig dataBusiness AnalyticsData ScienceData Structure & AlgorithmDatabasesVector DatabaseDeep LearningEthical HackingGenerative AIMachine Learning
      Big data

      LangExtract + Milvus: A Practical Guide to Building a Hybrid Document Processing and Search System

      30 August 2025
      Big data

      Stop Your AI Assistant from Writing Outdated Code with Milvus SDK Code Helper

      26 August 2025
      Big data

      A Practical Guide for Choosing the Right Vector Database for Your AI Applications

      26 August 2025
      Big data

      Why I’m Against Claude Code’s Grep-Only Retrieval? It Just Burns Too Many Tokens

      26 August 2025
    • Big data
    • Business Analytics
    • Databases
    • Data Structure & Algorithm
    • Data Science
    • Deep Learning
    • Ethical Hacking
    • Generative AI
    • Machine Learning
    • Security & Testing
  • Mobile
    • AllAndroidIOS
      Android

      It’s your last chance to score a $50 Samsung credit before tomorrow’s big product announcement

      4 September 2025
      Android

      The Samsung Health app now puts a licensed doctor right in your pocket

      3 September 2025
      Android

      Google’s NotebookLM is giving Audio Overviews new personalities

      3 September 2025
      Android

      MediaTek’s next flagship chip may give future Android phones faster cores and a beefed-up NPU

      3 September 2025
    • Android
    • IOS
  • Languages
    • AllAjaxAngularDynamic ProgrammingGolangJavaJavascriptPhpPythonReactVue
      Languages

      Working with Titles and Heading – Python docx Module

      25 June 2025
      Languages

      Creating a Receipt Calculator using Python

      25 June 2025
      Languages

      One Liner for Python if-elif-else Statements

      25 June 2025
      Languages

      Add Years to datetime Object in Python

      25 June 2025
    • Java
    • Python
  • Guest Blogs
  • Discussion
  • Our Team
HomeData Modelling & AIBig dataTop 15 Strategies to Reduce Latency
Big dataGuest Blogs

Top 15 Strategies to Reduce Latency

Algomaster
By Algomaster
15 June 2025
0
1
Share
Facebook
Twitter
Pinterest
WhatsApp

    Top 15 Strategies to Reduce Latency

    Ashish Pratap Singh's avatar

    Ashish Pratap Singh
    Apr 24, 2025
    ∙ Paid

    Latency is the time it takes for a system to respond to a user’s action. In simple terms, it’s the delay between:

    • When a user makes a request

    • And when they receive a response

    Even small delays can have a significant impact. To put it into perspective:

    Amazon estimates that every 1-second increase in latency could cost them $1.6 billion in annual sales.

    On the flip side, low latency means smoother interactions, and a better overall user experience.

    In this article, we’ll explore

    • The different types of latency that exist across your stack

    • And the top 15 strategies to reduce latency


    Types of Latency

    1. Network Latency

    Network latency is the time it takes for data to travel across a network—from the client (e.g., a browser or mobile app) to the server and back. It’s often the first and most noticeable form of latency a user experiences.

    What Causes High Network Latency?

    1. Physical Distance: Data travels at near the speed of light, but if your server is in New York and your user is in Sydney, that distance adds real delay.

    2. DNS Resolution Time: Before the request even hits your app, the domain must be resolved into an IP address. Poor DNS configuration or slow DNS providers can add 20–100ms.

    3. TCP Handshake & TLS Negotiation: Establishing a connection (especially over HTTPS) requires multiple back-and-forth steps.

    4. Packet Routing & Congestion: Packets may take inefficient routes or hit overloaded network segments.

    5. Firewall and Proxy Overhead: Security appliances or proxies along the path can introduce additional hops and inspection delays.

    2. Application Latency

    Application latency is the time your backend system takes to:

    1. Receive a request (after it hits the server)

    2. Process the request (run logic, call services, query databases)

    3. Generate a response and send it back

    It’s the delay introduced by the backend code and often one of the biggest contributors to total latency in a system.

    What Causes High Application Latency?

    1. Inefficient Business Logic: Poorly written algorithms, redundant loops, or unoptimized code paths

    2. Blocking Operations: Synchronous calls to databases, APIs, or file systems without using async/concurrent patterns

    3. Service-to-service Chaining (Microservices): If one API calls another which calls another, latency compounds quickly

    4. Poor Error Handling or Retries: Excessive retries or long timeouts can delay responses unnecessarily

    5. Lack of Caching: Recomputing results that could have been fetched from cache

    6. Heavy Serialization/Deserialization: Large JSON payloads, XML parsing, or inefficient marshaling

    3. Database Latency

    Database latency is the round-trip time between:

    1. Sending a query to the database

    2. The database executing the query (compute, read, write, etc.)

    3. Receiving the result back in your application

    In most backend applications, databases are the #1 bottleneck. A single slow query can hold up an entire request, and at scale, even small inefficiencies compound into major performance issues.

    What Causes High Database Latency?

    1. Unindexed Queries: Full table scans instead of using indexes

    2. N+1 Query Problems: Querying inside a loop, leading to dozens or hundreds of queries per request

    3. Large Result Sets: Fetching more data than needed (e.g., SELECT * on large tables)

    4. Poor Schema Design: Lack of normalization or too many unnecessary relations

    5. Lock Contention or Deadlocks: Multiple transactions competing for the same rows

    6. Resource Saturation: High CPU, memory, or I/O usage on the database server

    4. Client-side Latency

    Once your backend has done its job and the response reaches the user’s device, there’s still one more critical step: the client needs to render and display the data. That final stretch is what we call client-side latency.

    Client-side latency is the delay between receiving data on the client (browser, mobile app, etc.) and displaying the usable content or UI to the user.

    What Causes High Client-side Latency?

    1. Large JavaScript Bundles: Too much JavaScript needs to be downloaded, parsed, and executed before anything appears on screen.

    2. Slow DOM Manipulation: Poorly optimized DOM updates or frequent reflows/repaints can choke rendering.

    3. Inefficient Rendering Logic: Complex, deeply nested components or unoptimized React/Vue/Svelte code can slow rendering.

    4. Image & Asset Load Time: Uncompressed or unoptimized media assets (images, fonts, videos) block the UI from displaying.

    5. Excessive Client-side Computation: Performing heavy calculations, filtering, or formatting on the frontend delays rendering.

    6. Blocking Resources: CSS or fonts that are render-blocking can delay the first paint or cause layout shifts.


    Top 15 Strategies to Reduce Latency

    These strategies are not ranked in any particular order. In practice, you’ll often need to apply multiple techniques together, depending on your system’s architecture, scale, and latency goals.

    1. Caching

    When users expect blazing-fast responses, hitting your backend or database for every request just doesn’t scale. That’s where caching comes in.

    Caching is the process of storing a copy of data closer to where it’s needed, typically in fast-access memory like RAM.

    When the cache contains the required data (a cache hit), the application avoids slower downstream operations like database queries or API calls. This can cut response times from hundreds of milliseconds to single-digit milliseconds.

    Client-side Caching

    Client-side caching stores data on the user’s device, typically in the browser or mobile app. It reduces the need to re-fetch resources from the network.

    You can cache static assets like images, JavaScript, CSS, or even API responses that rarely change.

    • Browser Cache: When you specify proper HTTP caching headers (e.g., Cache-Control, ETag, Expires), the browser stores assets locally. On subsequent requests, it can quickly load these from the local cache rather than fetching them again from the server.

    • Local Storage / IndexedDB: Modern browsers offer persistent storage options. For example, you could store user preferences, profile data or application settings in localStorage or IndexedDB so that the next time the user visits, the application can load instantly without waiting for the server.

    Server-side Caching

    Server-side caching stores frequently requested data on the server, reducing the load on your database and speeding up responses.

    • In-memory Caches: In-memory caches (e.g., Redis) keep data in a server’s main memory (RAM) for extremely fast access. An application server can check the cache first before hitting the database.

    • Application-level Caches: Application level caches (e.g., caffeine in java) run directly in your application’s memory, storing frequently used data like computed values, or common database query results right where requests are processed.


    2. Content Delivery Networks (CDNs)

    Every millisecond counts when a user loads your website or app. If your server is located in India but your user is in New York, every request travels halfway across the world.

    Content Delivery Networks (CDNs) solve this by caching your static assets (and sometimes dynamic content) in data centers around the world, so users can access them from a location geographically close to them.

    Map of globally distributed servers serving content - What is a CDN

    https://www.cloudflare.com/learning/cdn/what-is-a-cdn/

    A CDN is a globally distributed network of edge servers that cache and deliver content like images, JavaScript, CSS, videos, and even full page to users based on their location.

    When a user requests content, the nearest CDN server delivers it instead of reaching all the way to the origin server.

    This significantly reduces latency, bandwidth usage, and server load.


    3. Load Balancing

    When your application starts receiving thousands (or millions) of concurrent requests, a single server might struggle to handle the load. To scale horizontally, you add more servers. But to ensure those requests are distributed efficiently, you need a load balancer.

    A load balancer acts like an intelligent traffic cop. It distributes incoming requests across multiple backend servers to ensure no single server is overwhelmed. This ensures high availability and keeps response times low, even during traffic spikes.

    Load Balancing Algorithms

    1. Round Robin: Sends each request to the next server in a loop. Good for evenly sized tasks.

    2. Least Connections: Chooses the server with the fewest active connections. Ideal when some requests are long-lived (e.g., WebSockets).

    3. IP Hash / Consistent Hashing: Routes requests based on client IP or hashed key. Useful for session persistence or cache affinity.

    4. Weighted Load Balancing: Assigns more traffic to powerful servers. Great for heterogeneous infrastructure.

    5. Latency-based Routing: Routes traffic based on server response time. Perfect for multi-region setups.


    4. Asynchronous Processing

    This post is for paid subscribers

    Already a paid subscriber? Sign in
    Share
    Facebook
    Twitter
    Pinterest
    WhatsApp
      Previous article
      Designing a Scalable “Likes” Counting System for Social Media
      Next article
      Designing a Distributed Key-Value Store (Step-by-Step)
      Algomaster
      Algomasterhttps://blog.algomaster.io
      RELATED ARTICLES
      Guest Blogs

      7 Best 123Movies Alternatives in 2025: Free & Safe Sites by Ivan Stevanovic

      3 September 2025
      Guest Blogs

      Interview with Tyson Garrett – CTO of TrustOnCloud – Making Cloud Threat Modeling Executable by Shauli Zacks

      2 September 2025
      Big data

      LangExtract + Milvus: A Practical Guide to Building a Hybrid Document Processing and Search System

      30 August 2025

      LEAVE A REPLY Cancel reply

      Log in to leave a comment

      Most Popular

      It’s your last chance to score a $50 Samsung credit before tomorrow’s big product announcement

      4 September 2025

      The Samsung Health app now puts a licensed doctor right in your pocket

      3 September 2025

      Google’s NotebookLM is giving Audio Overviews new personalities

      3 September 2025

      MediaTek’s next flagship chip may give future Android phones faster cores and a beefed-up NPU

      3 September 2025
      Load more
      Algomaster
      Algomaster
      202 POSTS0 COMMENTS
      https://blog.algomaster.io
      Calisto Chipfumbu
      Calisto Chipfumbu
      6637 POSTS0 COMMENTS
      http://cchipfumbu@gmail.com
      Dominic
      Dominic
      32260 POSTS0 COMMENTS
      http://wardslaus.com
      Milvus
      Milvus
      81 POSTS0 COMMENTS
      https://milvus.io/
      Nango Kala
      Nango Kala
      6625 POSTS0 COMMENTS
      neverop
      neverop
      0 POSTS0 COMMENTS
      https://geeksforgeeks.org
      Nicole Veronica
      Nicole Veronica
      11795 POSTS0 COMMENTS
      Nokonwaba Nkukhwana
      Nokonwaba Nkukhwana
      11855 POSTS0 COMMENTS
      Safety Detectives
      Safety Detectives
      2594 POSTS0 COMMENTS
      https://www.safetydetectives.com/
      Shaida Kate Naidoo
      Shaida Kate Naidoo
      6747 POSTS0 COMMENTS
      Ted Musemwa
      Ted Musemwa
      7023 POSTS0 COMMENTS
      Thapelo Manthata
      Thapelo Manthata
      6694 POSTS0 COMMENTS
      Umr Jansen
      Umr Jansen
      6714 POSTS0 COMMENTS

      EDITOR PICKS

      It’s your last chance to score a $50 Samsung credit before tomorrow’s big product announcement

      4 September 2025

      The Samsung Health app now puts a licensed doctor right in your pocket

      3 September 2025

      Google’s NotebookLM is giving Audio Overviews new personalities

      3 September 2025

      POPULAR POSTS

      It’s your last chance to score a $50 Samsung credit before tomorrow’s big product announcement

      4 September 2025

      The Samsung Health app now puts a licensed doctor right in your pocket

      3 September 2025

      Google’s NotebookLM is giving Audio Overviews new personalities

      3 September 2025

      POPULAR CATEGORY

      • Languages45985
      • Data Modelling & AI17566
      • Java15156
      • Android14049
      • Mobile12983
      • Javascript12713
      • Guest Blogs12669
      • Data Structure & Algorithm10077
      Logo

      ABOUT US

      We provide you with the latest breaking news and videos straight from the technology industry.

      Contact us: hello@geeksforgeeks.org

      FOLLOW US

      Blogger
      Facebook
      Flickr
      Instagram
      VKontakte

      © NeverOpen 2022

      • Home
      • News
      • Data Modelling & AI
      • Mobile
      • Languages
      • Guest Blogs
      • Discussion
      • Our Team