The Programmer's Guide
  • About
  • Algorithm
    • Big O Notation
      • Tree
      • Problems
    • Basic Notes
    • Data Structure Implementation
      • Custom LinkedList
      • Custom Stack
      • Custom Queue
      • Custom Tree
        • Binary Tree Implementation
        • Binary Search Tree Implementation
        • Min Heap Implementation
        • Max Heap Implementation
        • Trie Implementation
      • Custom Graph
        • Adjacency List
        • Adjacency Matrix
        • Edge List
        • Bidirectional Search
    • Mathematical Algorithms
      • Problems - Set 1
      • Problems - Set 2
    • Bit Manipulation
      • Representation
      • Truth Tables
      • Number System
        • Java Program
      • Problems - Set 1
    • Searching
    • Sorting
    • Array Algorithms
    • String Algorithms
    • Tree
      • Tree Traversal Techniques
      • Tree Implementation
      • Applications of Trees
      • Problems - Set 1
    • Graph
      • Graph Traversal Techniques
      • Shortest Path Algorithms
      • Minimum Spanning Tree (MST) Algorithms
    • Dynamic Programming
      • Problems - Set 1
    • Recursion
    • Parallel Programming
    • Miscellaneous
      • Problems - Set 1
  • API
    • API Basics
      • What is an API?
      • Types of API
        • Comparison - TBU
      • Synchronous vs Asynchronous API
    • API Architecture
      • Synchronous & Asynchronous Communication
    • API Specification
  • Cloud Computing
    • Cloud Fundamentals
      • Cloud Terminology
      • Core Terminology
      • Cloud Models
      • Cloud Service Models
      • Benefits, Challenges and Risk of Cloud Computing
      • Cloud Ecosystem
  • Database
    • DBMS
      • Types of DBMS
        • Relational DBMS (RDBMS)
        • NoSQL DBMS
        • Object-Oriented DBMS (OODBMS)
        • Columnar DBMS
        • In-Memory DBMS
        • Distributed DBMS
        • Cloud-Based DBMS
        • Hierarchical DBMS
      • DBMS Architecture
      • DBMS Structure
    • SQL Databases
      • Terminology
      • RDBMS Concepts
        • Entity Relationship Diagram (ERD)
          • ERD Examples
        • Normalization
        • Denormalization
        • ACID & BASE Properties
          • ACID Properties
          • BASE Properties
        • Locking and Unlocking
      • SQL Fundamentals
        • SQL Commands
          • DDL (Data Definition Language)
          • DML (Data Manipulation Language)
          • DCL (Data Control Language)
          • TCL (Transaction Control Language)
          • DQL (Data Query Language)
        • SQL Operators
          • INTERSECT
          • EXCEPT
          • MINUS
          • IN and NOT IN
          • EXISTS and NOT EXISTS
        • SQL Clauses
          • Joins
          • OVER
          • WITH
          • CONNECT BY
          • MODEL
          • FETCH FIRST
          • KEEP
          • OFFSET with FETCH
        • SQL Functions
          • Oracle Specific
        • SQL Data Types
          • Numeric Types
          • Character Types
          • Date & Time Types
          • Large Object Types
        • Others
          • Indexing
      • Vendor Specific Concepts
        • Oracle Specific
          • Data Types
          • Character Set
          • Rownum, Rowid, Urowid
          • Order of Execution of the query
          • Keys
          • Tablespace
          • Partition
      • Best Practice
      • Resources & References
        • O’Reilly SQL Cookbook (2nd Edition)
          • 1. Retrieving Records
          • 2. Sorting Query Results
          • 3. Working with Multiple Tables
          • 4. Inserting, Updating, and Deleting
          • 5. Metadata Queries
          • 6. Working with Strings
          • 7. Working with Numbers
          • 8. Date Arithmetic
          • 9. Date Manipulation
          • 10. Working with Ranges
          • 11. Advanced Searching
          • 12. Reporting and Reshaping
          • 13. Hierarchical Queries
          • 14. Odds 'n' Ends
    • SQL vs NoSQL
    • Best Practices
  • Git
    • Commands
      • Setup and Configuration Commands
      • Getting and Creating Projects
      • Tracking Changes
      • Branching and Merging
      • Sharing and Updating Projects
      • Inspection and Comparison
      • Debugging
      • Patching
      • Stashing and Cleaning
      • Advanced Manipulations
    • Workflows
      • Branching Strategies
        • Git Flow
        • Trunk-Based Development
        • GitHub Flow
        • Comparison
      • Merge Strategies
        • Merge
        • Rebase
        • Squash
        • Fast-forward vs No-fast-forward
        • MR vs PR
      • Conflict Resolution
        • Handling Merge Conflicts
        • Merge Conflicts
        • Rebase Conflicts
        • Divergent Branches After git pull
        • Force Push
      • Patch & Recovery
        • Cherry-pick strategies
        • Revert vs Reset
        • Recover from a bad rebase
      • Rebasing Practices
        • Merge vs Rebase
        • Rebase develop branch on main branch
      • Repository Management
        • Working Directory
        • Mirror a repository
        • Convert a local folder to a Git repo
        • Backup and restore a Git repository
  • Java
    • Java Installation
    • Java Distributions
    • Java Platform Editions
      • Java SE
      • Java EE
      • Jakarta EE
      • Java ME
      • JavaFX
    • Java Overview
      • OOP Principles
        • Encapsulation
        • Inheritance
        • Polymorphism
        • Abstraction
          • Abstract Class & Method
          • Interface
            • Functional Interfaces
            • Marker Interfaces
          • Abstract Class vs Interface
      • OOP Basics
        • What is a Class?
          • Types of Classes
        • What is an Object?
          • Equals and HashCode
            • FAQ
          • Shallow Copy and Deep Copy
          • Ways to Create Object
          • Serialization & Deserialization
        • Methods & Fields
          • Method Overriding & Overloading
          • Method Signature & Header
          • Variables
        • Constructors
        • Access Modifiers
      • Parallelism & Concurrency
        • Ways to Identify Thread Concurrency or Parallelism
        • Thread Basics
          • Thread vs Process
          • Creating Threads
          • Thread Context Switching
          • Thread Lifecycle & States
          • Runnable & Callable
          • Types of Threads
          • Thread Priority
        • Thread Management & Synchronisation
          • Thread Resource Sharing
          • Thread Synchronization
            • Why is Synchronization Needed?
            • Synchronized Blocks & Methods
          • Thread Lock
            • Types of Locks
            • Intrinsic Lock (Monitor Lock)
            • Reentrant Lock
          • Semaphore
          • Thread Starvation
          • Thread Contention
          • Thread Deadlock
          • Best Practices for Avoiding Thread Issues
      • Keywords
        • this
        • super
        • Access Modifiers
      • Data Types
        • Default Values
        • Primitive Types
          • byte
          • short
          • int
          • long
          • float
          • double
          • char
          • boolean
        • Non-Primitive (Reference) Types
          • String
            • StringBuilder
            • StringBuffer
              • Problems
            • Multiline String
            • Comparison - String, StringBuilder & StringBuffer
          • Array
          • Collections
            • List
              • Array vs List
              • ArrayList
              • Vector
                • Stack
                  • Problems
              • LinkedList
            • Queue
              • PriorityQueue
              • Deque (Double-Ended Queue)
                • ArrayDeque
                • ConcurrentLinkedDeque - TBU
                • LinkedBlockingDeque - TBU
            • Map
              • HashMap
              • Hashtable
              • LinkedHashMap
              • ConcurrentHashMap
              • TreeMap
              • EnumMap
              • WeakHashMap
            • Set
              • HashSet
              • LinkedHashSet
              • TreeSet
              • EnumSet
              • ConcurrentSkipListSet
              • CopyOnWriteArraySet
        • Specialized Classes
          • BigInteger
          • BigDecimal
            • Examples
          • BitSet
          • Date and Time
            • Examples
          • Optional
          • Math
          • UUID
          • Scanner
          • Formatter
            • Examples
          • Properties
          • Regex (Pattern and Matcher)
            • Examples
          • Atomic Classes
          • Random
          • Format
            • NumberFormat
            • DateFormat
            • DecimalFormat
        • Others
          • Object
          • Enum
            • Pre-Defined Enum
            • Custom Enum
            • EnumSet and EnumMap
          • Record
          • Optional
          • System
          • Runtime
          • ProcessBuilder
          • Class
          • Void
          • Throwable
            • Error
            • Exception
              • Custom Exception Handling
              • Best Practice
            • Error vs Exception
            • StackTraceElement
    • Java Features by Version
      • How New Java Features are Released ?
      • Java Versions
        • Java 8
        • Java 9
        • Scoped Values
        • Unnamed Variables & Patterns
      • FAQ
    • Concepts
      • Set 1
        • Streams
          • flatmap
          • Collectors Utility Class
          • Problems
        • Functional Interfaces
          • Standard Built-In Interfaces
          • Custom Interfaces
        • Annotation
          • Custom Annotation
          • Meta Annotation
        • Generics
          • Covariance and Invariance
        • Asynchronous Computation
          • Future
          • CompletableFuture
          • Future v/s CompletableFuture
          • ExecutorService
            • Thread Pool
            • Types of Work Queues
            • Rejection Policies
            • ExecutorService Implementations
            • ExecutorService Usage
          • Locks, Atomic Variables, CountDownLatch, CyclicBarrier - TBU
          • Parallel Streams, Fork/Join Framework,Stream API with Parallelism - TBU
      • Set 2
        • Standards
          • ISO Standards
          • JSR
            • JSR 303, 349, 380 (Bean Validation)
        • Operator Precedence
      • Set 3
        • Date Time Formatter
        • Validation
      • Set 4
        • Input from User
        • Comparison & Ordering
          • Object Equality Check
          • Comparable and Comparator
            • Comparator Interface
          • Sorting of Objects
          • Insertion Ordering
    • Packages
      • Core Packages
        • java.lang
          • java.lang.System
          • java.lang.Thread
      • Jakarta Packages
        • jakarta.validation
        • javax.validation
      • Third-party Packages
    • Code Troubleshoot
      • Thread Dump
      • Heap Dump
    • Code Quality & Analysis
      • ArchUnit
      • Terminologies
        • Cyclic dependencies
    • Code Style
      • Naming Convention
      • Package Structure
      • Formatting
      • Comments and Documentation
      • Imports
      • Exception Handling
      • Class Structure
      • Method Guidelines
      • Page 1
      • Code Smells to Avoid
      • Lambdas and Streams Style
      • Tools
    • Tools
      • IntelliJ IDEA
        • Shortcuts for MAC
      • Apache JMeter
        • Examples
      • Thread Dump Capture
        • jstack
        • VisualVM - TBU
        • jcmd - TBU
        • JConsole - TBU
        • YourKit Java Profiler - TBU
        • Eclipse MAT - TBU
        • IntelliJ IDEA Profiler - TBU
        • AppDynamics - TBU
        • Dynatrace - TBU
        • Thread Dump Analyzers - TBU
      • Heap Dump Capture
        • jmap
        • VisualVM - TBU
        • jcmd - TBU
        • Eclipse MAT (Memory Analyzer Tool) - TBU
        • IntelliJ IDEA Profiler - TBU
        • YourKit Java Profiler - TBU
        • AppDynamics - TBU
        • Dynatrace - TBU
        • Kill -3 Command - TBU
        • jhat (Java Heap Analysis Tool) - TBU
        • JVM Options - TBU
      • Wireshark
        • Search Filters
    • Best Practices
      • Artifact and BOM Versioning
  • Maven
    • Installation
    • Local Repository & Configuration
    • Command-line Options
    • Build & Lifecycle
    • Dependency Management
      • Dependency
        • Transitive Dependency
        • Optional Dependency
      • Dependency Scope
        • Maven Lifecycle and Dependency Scope
      • Dependency Exclusions & Overrides
      • Bill of Materials (BOM)
      • Dependency Conflict Resolution
      • Dependency Tree & Analysis
      • Dependency Versioning Strategies
    • Plugins
      • Build Lifecycle Management
      • Dependency Management
      • Code Quality and Analysis
      • Documentation Generation
      • Code Generation
      • Packaging and Deployment
      • Reporting
      • Integration and Testing
      • Customization and Enhancement
        • build-helper-maven-plugin
        • properties-maven-plugin
        • ant-run plugin
        • exec-maven-plugin
        • gmavenplus-plugin
      • Performance Optimization
    • FAQs
      • Fixing Maven SSL Issues: Unable to Find Valid Certification Path
  • Spring
    • Spring Basics
      • What is Spring?
      • Why Use Spring
      • Spring Ecosystem
      • Versioning
      • Setting Up a Spring Project
    • Core Concepts
      • Spring Core
        • Dependency Injection (DI)
        • Stereotype Annotation
      • Spring Beans
        • Bean Lifecycle
        • Bean Scope
          • Singleton Bean
        • Lazy & Eager Initialization
          • Use Case of Lazy Initialization
        • BeanFactory
        • ApplicationContext
      • Spring Annotations
        • Spring Boot Specific
        • Controller Layer (Web & REST Controllers)
    • Spring Features
      • Auto Configuration
        • Spring Boot 2: spring.factories
        • Spring Boot 3: spring.factories
      • Spring Caching
        • In-Memory Caching
      • Spring AOP
        • Before Advice
        • After Returning Advice
        • After Throwing Advice
        • After (finally) Advice
        • Around Advice
      • Spring File Handling
      • Reactive Programming
        • Reactive System
        • Reactive Stream Specification
        • Project Reactor
          • Mono & Flux
      • Asynchronous Computation
        • @Async annotation
      • Spring Security
        • Authentication
          • Core Components
            • Security Filter Chain
              • HttpSecurity
              • Example
            • AuthenticationManager
            • AuthenticationProvider
            • UserDetailsService
              • UserDetails
              • PasswordEncoder
            • SecurityContext
            • SecurityContextHolder
            • GrantedAuthority
            • Security Configuration (Spring Security DSL)
          • Authentication Models
            • One-Way Authentication
            • Mutual Authentication
          • Authentication Mechanism
            • Basic Authentication
            • Form-Based Authentication
            • Token-Based Authentication (JWT)
            • OAuth2 Authentication
            • Multi-Factor Authentication (MFA)
            • SAML Authentication
            • X.509 Certificate Authentication
            • API Key Authentication
            • Remember-Me Authentication
            • Custom Authentication
          • Logout Handling
        • Authorization
        • Security Filters and Interceptors
        • CSRF
          • Real-World CSRF Attacks & Prevention
        • CORS
        • Session Management and Security
        • Best Practices
      • Spring Persistence
        • JDBC
          • JDBC Components
          • JDBC Template
          • Transaction Management
          • Best Practices in JDBC Usage
          • Datasource
            • Connection Pooling
              • HikariCP
            • Caching
        • JPA (Java Persistence API)
          • JPA Fundamentals
          • ORM Mapping Annotations
            • 1. Entity and Table Mappings
            • 2. Field/Column Mappings
            • 3. Relationship Mappings
            • 4. Inheritance Mappings
            • 5. Additional Configuration Annotations
          • Querying Data
            • JPQL
            • Criteria API
            • JPA Specification
              • Example - Employee Portal
            • Native SQL Queries
            • Named Queries
            • Query Return Types
            • Pagination & Sorting
              • Example - Employee Portal
            • Projection
          • Fetch Strategies in JPA
        • JPA Implementation
          • Hibernate
            • Properties
            • Example
        • Spring Data JPA
          • Repository Abstractions
          • Entity-to-Table Mapping
          • Derived Query Methods
        • Cross-Cutting Concerns
          • Transactions
          • Caching
          • Concurrency
        • Examples
          • Employee Portal
            • API
    • Distributed Systems & Communication
      • Distributed Scheduling
      • Inter-Service Communication
        • 1. RestTemplate
        • 2. WebClient
        • 3. OpenFeign
        • Retry Mechanism
          • @Retryable annotation
            • Example
    • Security & Data Protection
      • Encoding | Decoding
        • Types
          • Base Encoding
            • Base16 - TBD
              • Encoding and Decoding in Java - TBD
            • Base32
              • Encoding and Decoding in Java
            • Base64 -TBD
              • Encoding and Decoding in Java - TBD
          • Text Encoding - TBD
            • Extended ASCII
              • Encoding and Decoding in Java - TBD
                • ISO-8859-1
                • Windows-1252 - TBD
                • IBM Code Pages - TBD
            • ASCII
              • Encoding and Decoding in Java
        • Java Guidelines
          • Text Encoding Decoding Examples
          • Base Encoding Decoding Examples
          • Best Practices and Concepts
          • Libraries
      • Cryptography
        • Terminology
        • Java Cryptography Architecture (JCA)
        • Key Management
          • Key Generation
            • Tools and Libraries
              • OpenSSL
              • Java Keytool
                • Concept
                • Use Cases
            • Key & Certificate File Formats
          • Key Distribution
          • Key Storage
          • Key Rotation
          • Key Revocation
        • Encryption & Decryption
          • Symmetric Encryption
            • Algorithm
            • Modes of Operation
            • Examples
          • Asymmetric Encryption
            • Algorithm
            • Mode of Operation
            • Examples
    • Utilities & Libraries
      • Apache Libraries
        • Apache Camel
          • Camel Architecture
            • Camel Context
            • Camel Endpoints
            • Camel Components
            • Camel Exchange & MEP
          • Spring Dependency
          • Different Components
            • Camel SFTP
        • Apache Commons Lang
      • MapStruct Mapper
      • Utilities by Spring framework
        • FileCopyUtils
    • General Concepts
      • Spring Boot Artifact Packaging
      • Classpath and Resource Loading
      • Configuration - Mapping Properties to Java Class
      • Validations in Spring Framework
        • Jakarta Validation
          • Jakarta Bean Validation Annotations
    • Practical Guidelines
      • Spring Configuration
      • Spring Code Design
  • Software Testing
    • Software Testing Methodologies
      • Functional Testing
      • Non Functional Testing
    • Software Testing Life Cycle (STLC)
    • Integration Test
      • Dynamic Property Registration
    • Java Test Framework
      • JUnit
        • JUnit 4
          • Examples
        • JUnit 5
          • Examples
        • JUnit 4 vs JUnit 5
  • System Design
    • Foundations
      • Programming Paradigms
      • Object-Oriented Design
        • SOLID Principles
        • GRASP Principles
        • Composition
        • Aggregation
        • Association
      • Design Pattern
        • Creational Pattern
        • Structural Pattern
        • Behavioral Pattern
        • Examples
          • Data Collector
          • Payment Processor
        • Design Enhancements
          • Fluent API Design
            • Examples
    • Architectural Building Blocks
      • CAP Theorem
      • Load Balancer
        • Load Balancer Architecture
        • Load Balancing in Java Microservices
          • Client-Side Load Balancing Example
          • Server-Side Load Balancing Example
        • Load Balancer Monitoring Tool
      • Scaling
        • Vertical Scaling (Scaling Up)
        • Horizontal Scaling (Scaling Out)
        • Auto-Scaling
        • Database Scaling via Sharding
      • Caching
        • Pod-Level vs Distributed Caching
      • Networking Metrics
        • Types of Delay
        • Scenario
      • System Characteristics
      • Workload Types
      • Resilience & Failure Handling
    • Performance
      • Why Is My API Sometimes Slow ?
    • Security
      • Security by Design
      • Zero Trust Security Model
      • Zero Trust Architecture
      • Principles
        • CIA
        • Least Privilege Principle
        • Defense in Depth
      • Security Threats & Mitigations
        • OWASP
          • Top 10 Security Threats
          • Application Security Verification Standard
          • Software Assurance Maturity Model
          • Dependency Check
          • CSRFGuard
          • Cheat Sheets
          • Security Testing Guide
          • Threat Dragon
        • Threat Modeling
      • Compliance & Regulation
        • PCI DSS
    • Deployment Patterns
    • Diagrams
      • UML Diagrams
        • PlantUML
          • Class Diagram
          • Object Diagram
          • Sequence Diagram
          • Use Case Diagram
          • Activity Diagram
          • State Diagram
          • Architecture Diagram
          • Component Diagram
          • Timing Diagram
          • ER Diagram (Entity-Relationship)
          • Network Diagram
    • Common Terminologies
    • Problems
      • Reference Materials
      • Cache Design
  • Interview Guide
    • Non-Technical
      • Behavioural or Introductory Guide
      • Project Specific
    • Technical
      • Java Interview Companion
        • Java Key Concepts
          • Set 1
          • Set 2
        • Java Code Snippets
        • Java Practice Programs
          • Set 3 - Strings
          • Set 4 - Search
          • Set 5 - Streams and Collection
      • SQL Interview Companion
        • SQL Practice Problems
          • Set 1
      • Spring Interview Companion
        • Spring Key Concepts
          • Set 1 - General
          • Set 2 - Core Spring
        • Spring Code Snippets
          • JPA
      • Application Server
      • Maven
      • Containerized Application
      • Microservices
    • General
      • Applicant Tracking System (ATS)
      • Flowchart - How to Solve Coding Problem?
Powered by GitBook
On this page
  • Network-Level Delays
  • 1. Transmission Delay
  • 2. Retransmission Delay
  • 3. Propagation Delay
  • 4. Queuing Delay
  • 5. Acknowledgment Delay (ACK Delay)
  • 6. Congestion Delay
  • 7. Handoff Delay (in Wireless Networks)
  • 8. DNS Resolution Delay
  • Application-Level Delays
  • 1. Software Processing Delay
  • 2. Serialization Delay
  • 3. Deserialization Delay
  • System-Level Delays (Hardware & OS-Related)
  • 1. Buffering Delay
  • 2. Processing Delay

Was this helpful?

  1. System Design
  2. Architectural Building Blocks
  3. Networking Metrics

Types of Delay

Network-Level Delays

1. Transmission Delay

The time required to push all bits of a packet into the transmission medium.

Formula

Transmission Delay = Packet Size (bits) / Bandwidth (bps)

  • Packet size – Larger packets take more time to be transmitted.

  • Bandwidth – Higher bandwidth reduces transmission delay.

Example

  • Sending a 1 MB (8 million bits) file over a 100 Mbps network:

Transmission Delay = 8,000,000 bits / 100,000,000 bps = 0.08 seconds(80ms)

2. Retransmission Delay

Retransmission delay is the time required to resend lost or corrupted packets over a network. When a packet fails to reach its destination correctly due to network congestion, packet loss, or corruption, it must be retransmitted, introducing additional delay in communication.

Formula

Retransmission Delay = Round Trip Time (RTT) + Time to Detect Loss + Backoff Delay (if applicable)

Where:

  • RTT (Round Trip Time) = Time for a packet to travel to the destination and back.

  • Time to Detect Loss = Delay introduced by mechanisms like ACK timeout or duplicate ACK detection.

  • Backoff Delay = Extra delay if the system follows an exponential backoff (e.g., TCP).

Causes of Retransmission Delay

  1. Packet Loss – Due to congestion, network failures, or buffer overflow.

  2. Corrupted Packets – Errors caused by interference, bad links, or hardware issues.

  3. High Network Load – Overloaded routers cause packet drops, leading to retransmission.

  4. TCP Congestion Control – TCP retransmits lost packets, sometimes introducing extra delay due to exponential backoff.

  5. Wireless Interference – In Wi-Fi and mobile networks, packet loss is common due to weak signals or interference.

  6. Route Fluctuations – Changing network paths may cause packet reordering, leading to retransmissions.

How Retransmission Works?

1. TCP Retransmission (Reliable Transport Protocols)

  • TCP detects lost packets via ACK timeout or duplicate ACKs.

  • If an ACK isn’t received within the timeout, TCP retransmits the packet.

  • Uses Exponential Backoff → If loss persists, the retransmission delay increases exponentially.

Example: TCP Retransmission

Client: Sends packet [SEQ=100]
Server: (Packet lost)
Client: Waits for ACK, but timeout occurs
Client: Retransmits packet [SEQ=100]
Server: Receives packet, sends ACK

2. UDP Retransmission (Application-Level Handling)

  • UDP itself does not handle retransmissions (unlike TCP).

  • Applications like VoIP, Video Streaming use custom retransmission mechanisms like Forward Error Correction (FEC) or retransmit lost packets based on sequence numbers.

Impact of Retransmission Delay

Area Affected

Impact

Network Performance

Increased congestion due to repeated packets

Application Latency

Slower response times (especially in TCP-based apps)

VoIP & Video Streaming

Jitter and buffering issues

Throughput

Decreased throughput in high-loss networks

Mobile & Wireless Networks

Poor quality due to high packet loss

Optimization Techniques to Reduce Retransmission Delay

1. Use Forward Error Correction (FEC)

  • Instead of waiting for retransmissions, send redundant data to recover lost packets.

  • Used in real-time streaming (VoIP, video calls) to reduce delay.

2. Optimize TCP Parameters

  • Reduce TCP Retransmission Timeout (RTO) → Adjust timeout dynamically to detect loss faster.

  • Enable Selective Acknowledgment (SACK) → Retransmit only lost packets, not the entire window.

  • Use TCP Fast Retransmit → Detect loss early based on duplicate ACKs instead of waiting for timeout.

3. Minimize Packet Loss

  • Use QoS (Quality of Service) to prioritize critical packets.

  • Increase buffer sizes to handle high traffic without dropping packets.

  • Optimize network congestion with Traffic Shaping (rate limiting) and Load Balancing.

4. Implement Adaptive Retransmission

  • Adaptive RTO (Retransmission Timeout) dynamically adjusts retransmission timing based on network conditions.

  • Example: TCP Vegas optimizes retransmission delay by monitoring network latency.

5. Improve Wireless Network Reliability

  • Use Hybrid ARQ (Automatic Repeat reQuest) – Combines FEC and retransmissions to minimize delay.

  • Optimize Wi-Fi Channel Selection – Reducing interference helps lower packet loss.

3. Propagation Delay

The time taken for a data packet to physically travel from sender to receiver through the transmission medium.

Formula

Propagation Delay = Distance / Propagation Speed

  • Distance between sender and receiver – Longer distances lead to higher delays.

  • Propagation speed of the medium – Speed varies for fiber optics, copper cables, and wireless.

Example

  • If a signal travels 3000 km (3,000,000 meters) through a fiber optic cable (200,000 km/s): Propagation Delay = 3,000,000 m / 200,000,000 m/s = 0.015 seconds(15ms)

Typical Propagation Speeds

Medium
Speed (m/s)

Fiber Optic

2 × 10^8

Copper Cable

1.5 × 10^8

Wireless (Air)

3 × 10^8

4. Queuing Delay

The time a packet spends waiting in a buffer before it gets transmitted due to network congestion.

Formula

Queuing Delay = (Number of Packets in Queue×Packet Size ) / Bandwidth

  • Network congestion – High traffic causes longer wait times.

  • Queue size – Limited buffer space can drop packets.

  • Traffic prioritization – QoS settings can favor important packets.

Example

  • A VoIP call packet waiting 10 ms in a queue due to high network traffic.

How to Reduce Queuing Delay?

  • Use Quality of Service (QoS) to prioritize real-time traffic.

  • Increase network bandwidth.

  • Use Load Balancers to distribute traffic across multiple paths.

5. Acknowledgment Delay (ACK Delay)

Acknowledgment Delay (ACK Delay) is the time between receiving a data packet and sending an acknowledgment (ACK) back to the sender. This delay can occur intentionally or unintentionally due to network conditions, protocol configurations, or system processing limitations.

Formula

ACK Delay = Processing Time + Intentional Delay + Network Delay

Where:

  • Processing Time = Time taken by the receiver to process the packet.

  • Intentional Delay = Some protocols (e.g., TCP Delayed ACK) introduce a delay before sending ACKs.

  • Network Delay = Transmission time between sender and receiver.

Causes of Acknowledgment Delay

  1. TCP Delayed ACK Mechanism

    • TCP intentionally waits before sending an ACK to reduce overhead.

    • Example: Delayed ACK in TCP waits up to 200ms before responding.

  2. Receiver Processing Time

    • The receiver takes time to validate, process, and queue packets before acknowledging them.

  3. Network Congestion & Buffering

    • ACK packets might be delayed due to network congestion or queuing at routers.

  4. Device Performance

    • Low-powered devices (IoT, embedded systems) might have longer processing delays before sending ACKs.

Impact of Acknowledgment Delay

Area Affected

Impact

TCP Throughput

High ACK delay reduces efficiency in data transfer.

Application Responsiveness

Delayed ACKs slow down real-time communication.

VoIP & Streaming

Increased jitter due to delayed acknowledgments.

Congestion Control

Large ACK delays cause retransmissions and poor congestion handling.

Optimization Techniques for Reducing ACK Delay

  1. Disable TCP Delayed ACK for Low-Latency Applications

    • Some operating systems allow adjusting or disabling delayed ACKs for better performance.

  2. Use Selective Acknowledgment (SACK)

    • TCP SACK allows acknowledging only lost packets, reducing retransmission overhead.

  3. Optimize Receiver Processing

    • Improve server processing speed to send ACKs faster.

  4. Use Faster Network Paths

    • Reduce latency in acknowledgment transmission by optimizing routes.

6. Congestion Delay

Congestion Delay occurs when network traffic exceeds available bandwidth, causing packets to wait in queues at routers, switches, or network interfaces before being transmitted. This delay is a result of network congestion and can significantly impact end-to-end latency.

Formula for Congestion Delay

Congestion Delay = Number of Queued Packets × Processing Time per PacketNetwork / Throughput

Where:

  • Queued Packets = Packets waiting to be transmitted.

  • Processing Time per Packet = Time taken to process each packet at the router or switch.

  • Network Throughput = Capacity of the network link.

Causes of Congestion Delay

  1. High Network Traffic

    • Too many packets being transmitted simultaneously exceed the available bandwidth.

  2. Bottlenecks in the Network Path

    • Slower links (e.g., 100 Mbps router connected to a 1 Gbps switch) create congestion points.

  3. Limited Buffer Size in Network Devices

    • If a router’s buffer is full, incoming packets must wait longer or get dropped.

  4. TCP Congestion Control Mechanisms

    • TCP reduces sending rate in response to congestion, further increasing delay.

Impact of Congestion Delay

Area Affected

Impact

Web Browsing

Slow page load times.

Streaming Services

Buffering and degraded video/audio quality.

Online Gaming

High latency, lag, and poor user experience.

VoIP Calls

Increased jitter and voice distortion.

Optimization Techniques for Reducing Congestion Delay

  1. Increase Network Capacity (Bandwidth Upgrades)

    • Add more links, upgrade to higher-speed networks (e.g., 10G, 100G).

  2. Implement Traffic Prioritization (QoS - Quality of Service)

    • Assign higher priority to real-time applications like VoIP, gaming, and video streaming.

  3. Use Load Balancing

    • Distribute traffic across multiple servers or network paths to avoid bottlenecks.

  4. Implement Active Queue Management (AQM)

    • Use Random Early Detection (RED) or Explicit Congestion Notification (ECN) to drop excess packets before buffers overflow.

7. Handoff Delay (in Wireless Networks)

Handoff Delay occurs when a mobile device moves between different network cells (Wi-Fi access points or cellular towers) and experiences a delay in re-establishing connectivity. This happens due to the time taken to switch to a new network without packet loss or service interruption.

Formula for Handoff Delay

Handoff Delay = Discovery Time + Authentication Time + Reassociation Time

Where:

  • Discovery Time = Time taken to detect a new access point or base station.

  • Authentication Time = Time required for security authentication.

  • Reassociation Time = Time taken to transfer active sessions to the new network.

Types of Handoff

  1. Hard Handoff (Break-Before-Make)

    • The connection breaks before establishing a new connection.

    • Example: Cellular handoff between 4G and 5G networks.

  2. Soft Handoff (Make-Before-Break)

    • The new connection is established before breaking the old one.

    • Example: Seamless VoIP call transition in mobile networks.

  3. Horizontal Handoff

    • Transition between the same type of network (e.g., switching from one Wi-Fi router to another).

  4. Vertical Handoff

    • Transition between different types of networks (e.g., Wi-Fi to 4G/5G).

Impact of Handoff Delay

Application

Effect of High Handoff Delay

VoIP Calls

Call drop or audio stutter during movement.

Video Streaming

Buffering or video quality degradation.

Online Gaming

High latency spikes leading to lag.

IoT Devices

Data transmission interruptions affecting smart devices.

Optimization Techniques for Reducing Handoff Delay

  1. Use Fast Handoff Protocols (802.11r for Wi-Fi Roaming)

    • Reduces reassociation time by allowing pre-authentication with nearby access points.

  2. Implement Predictive Handoff Techniques

    • AI-based systems predict movement patterns and proactively switch networks.

  3. Use Dual Connectivity in Cellular Networks

    • Maintain simultaneous connections to multiple base stations before switching.

  4. Reduce Authentication Delays with Caching Mechanisms

    • Store session credentials to speed up authentication.

8. DNS Resolution Delay

Formula for DNS Resolution Delay

DNS Delay = Query Time + Propagation Time + Processing Time

Where:

  • Query Time = Time taken for the request to reach the DNS server.

  • Propagation Time = Time required for recursive DNS lookups across multiple servers.

  • Processing Time = Time taken by the DNS server to respond.

Causes of DNS Resolution Delay

  1. Unoptimized Recursive DNS Queries

    • DNS queries may go through multiple intermediate servers, increasing resolution time.

  2. High Network Latency to DNS Server

    • Slow connectivity between client and DNS resolver can add to the delay.

  3. Cache Miss (No Cached DNS Response)

    • If the requested domain is not in cache, the resolver must fetch it from authoritative DNS servers.

  4. Slow or Overloaded DNS Servers

    • Public DNS servers (e.g., ISP-provided DNS) may be slow or congested.

Impact of DNS Resolution Delay

Application

Effect of High DNS Delay

Web Browsing

Slow initial page load times.

API Calls

Delays in backend service responses.

CDN Performance

Increased latency in content delivery.

Online Gaming

Higher ping times affecting gameplay.

Optimization Techniques for Reducing DNS Resolution Delay

  1. Use a Fast Public DNS Resolver

    • Services like Google DNS (8.8.8.8), Cloudflare DNS (1.1.1.1), or Quad9 (9.9.9.9) offer faster resolution.

  2. Enable DNS Caching

    • Store frequently accessed domain resolutions to avoid repeated lookups.

  3. Use Anycast Routing for DNS Queries

    • Directs requests to the nearest available DNS server, reducing query time.

  4. Reduce Recursive DNS Lookups

    • Use authoritative name servers with lower lookup dependencies.

Application-Level Delays

1. Software Processing Delay

Software Processing Delay refers to the time taken by an application to process a request before sending a response. This delay occurs due to computational tasks, data processing, database interactions, API calls, and various internal operations executed at the application layer.

Formula for Software Processing Delay

Software Processing Delay = Computation Time + I/O Time + Inter-Process Communication Time

Where:

  • Computation Time = Time taken for CPU-bound processing tasks.

  • I/O Time = Time spent in reading/writing data from files, databases, or network.

  • Inter-Process Communication Time = Time taken for process-to-process or service-to-service interactions.

Causes of Software Processing Delay

1. Heavy Computation Tasks

  • Cause: Complex calculations, data encryption, AI/ML inference, and large dataset processing.

  • Example: Generating reports with millions of records.

2. Inefficient Algorithm Complexity

  • Cause: Poorly optimized code with high time complexity (e.g., O(n²) instead of O(n log n)).

  • Example: Using brute-force search instead of binary search for lookups.

3. Database Query Execution Delay

  • Cause: Unoptimized queries, missing indexes, excessive joins, or high latency in distributed databases.

  • Example: Querying a large table without proper indexing.

4. Remote API Calls (Microservices Communication)

  • Cause: Calling external services, waiting for responses, or retrying failed requests.

  • Example: A payment processing system waiting for a third-party gateway’s response.

5. Garbage Collection (GC) Overhead

  • Cause: Frequent or inefficient memory management in languages like Java and Python.

  • Example: JVM pauses during Full GC cycles.

6. Thread Blocking and Synchronization Issues

  • Cause: Threads waiting on locks, mutexes, or semaphores in multithreading applications.

  • Example: A Java synchronized block causing contention.

7. Serialization and Deserialization Overhead

  • Cause: Converting objects to JSON/XML and vice versa for inter-service communication.

  • Example: Converting large Java objects to JSON for REST API responses.

8. Buffering and Caching Issues

  • Cause: Lack of caching, excessive disk reads, or cache invalidation issues.

  • Example: Fetching the same data from the database repeatedly instead of using Redis/Memcached.

Impact of Software Processing Delay

Application

Effect of High Software Processing Delay

Web Applications

Slow page load, poor user experience

REST APIs

High response time, affecting client services

Microservices

Increased latency in service-to-service calls

Streaming Services

Buffering and lag in video/audio playback

E-commerce Apps

Slow checkout process, affecting sales

Optimization Techniques for Reducing Software Processing Delay

1. Optimize Algorithm Efficiency

  • Use time-efficient data structures (e.g., HashMap instead of List for lookups).

  • Implement caching mechanisms for repeated computations.

2. Improve Database Performance

  • Use Indexes and Query Optimization techniques.

  • Implement Read-Replicas and Sharding for distributed databases.

3. Reduce API Call Overhead

  • Use asynchronous APIs and batch processing instead of making multiple synchronous calls.

  • Implement circuit breakers (e.g., Resilience4j) to prevent cascading failures.

4. Optimize Memory Usage

  • Tune Garbage Collection (GC) settings (e.g., G1GC in Java).

  • Avoid unnecessary object creation and large heap allocations.

5. Use Efficient Serialization Formats

  • Replace JSON/XML with faster serialization formats like Protocol Buffers (Protobuf) or MessagePack.

6. Implement Multi-threading and Parallel Processing

  • Use Thread Pools to handle concurrent requests.

  • Utilize frameworks like Reactive Programming (Spring WebFlux, RxJava) for non-blocking operations.

7. Leverage Caching Strategies

  • Use Redis or Memcached to cache frequently accessed data.

  • Implement Lazy Loading to fetch data only when required.

2. Serialization Delay

Serialization delay is the time required to convert data structures (e.g., objects, messages, or packets) into a format suitable for transmission over a network or storage. This process includes encoding, formatting, and preparing data before it can be sent.

Causes of Serialization Delay

  1. Data Complexity – Larger and more complex data structures take longer to serialize.

  2. Encoding Format – JSON, XML, Protocol Buffers, Avro, etc., have different processing speeds.

  3. Hardware Performance – CPU and memory speed affect serialization time.

  4. Serialization Library – Different libraries have different efficiencies (e.g., Java’s ObjectOutputStream is slower than Protocol Buffers).

  5. Compression Overhead – If data is compressed during serialization, it increases processing time.

Example

In Java, serializing an object using Java's default serialization mechanism:

import java.io.FileOutputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;

class Employee implements Serializable {
    private static final long serialVersionUID = 1L;
    String name;
    int id;
    
    Employee(String name, int id) {
        this.name = name;
        this.id = id;
    }
}

public class SerializeExample {
    public static void main(String[] args) {
        try {
            Employee emp = new Employee("John", 101);
            FileOutputStream fileOut = new FileOutputStream("employee.ser");
            ObjectOutputStream out = new ObjectOutputStream(fileOut);
            out.writeObject(emp);
            out.close();
            fileOut.close();
            System.out.println("Serialization completed.");
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

Serialization Delay in this example → The time required to convert the Employee object into a binary format before writing it to disk.

3. Deserialization Delay

Deserialization delay is the time taken to convert serialized data back into its original object structure. This process includes parsing, decoding, and reconstructing objects.

Causes of Deserialization Delay

  1. Complexity of Serialized Data – More fields and nested structures increase delay.

  2. Encoding Format – JSON and XML are text-based and slower than binary formats like Protocol Buffers.

  3. Hardware Performance – Slower CPU and memory affect deserialization speed.

  4. Garbage Collection Overhead – Deserialization creates new objects in memory, impacting performance.

  5. Library Used – Different frameworks (Jackson, Gson, Protocol Buffers) have varying speeds.

Example

Continuing from the previous serialization example, deserializing the Employee object:

import java.io.FileInputStream;
import java.io.ObjectInputStream;

public class DeserializeExample {
    public static void main(String[] args) {
        try {
            FileInputStream fileIn = new FileInputStream("employee.ser");
            ObjectInputStream in = new ObjectInputStream(fileIn);
            Employee emp = (Employee) in.readObject();
            in.close();
            fileIn.close();
            System.out.println("Deserialization completed: " + emp.name + ", " + emp.id);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

Deserialization Delay in this example → The time required to read the binary file and reconstruct the original Employee object.

System-Level Delays (Hardware & OS-Related)

1. Buffering Delay

Buffering Delay is the time a packet spends waiting in a buffer before being processed or transmitted. This delay happens when network devices (routers, switches, end devices) temporarily store packets due to congestion, processing limitations, or bandwidth restrictions.

Formula for Buffering Delay

Buffering Delay = (Queued Packets × Packet Processing Time) / Processing Speed

Where:

  • Queued Packets = Number of packets waiting in the buffer.

  • Packet Processing Time = Time taken to process each packet.

  • Processing Speed = Speed at which the device can process packets.

Causes of Buffering Delay

  1. Network Congestion

    • When multiple packets arrive at a device faster than they can be processed, they get queued in a buffer.

  2. Traffic Shaping & Rate Limiting

    • Some networks intentionally buffer packets to regulate traffic and avoid bursts.

  3. Video & Audio Streaming Buffers

    • Video players buffer content to avoid playback interruptions due to network fluctuations.

  4. Router & Switch Queueing

    • Network devices hold packets in buffers when outgoing links are busy.

  5. Disk & Memory Bottlenecks

    • In databases and applications, data buffering delays occur when reading/writing from disk or RAM.

Impact of Buffering Delay

Area Affected

Impact

Video Streaming

Too much buffering leads to increased startup time.

Online Gaming

High buffering delay causes lag and poor responsiveness.

Network Performance

Large buffers introduce excessive delay (bufferbloat issue).

Cloud Applications

Delays in data retrieval slow down cloud-based services.

Optimization Techniques for Reducing Buffering Delay

  1. Use Active Queue Management (AQM)

    • Algorithms like RED (Random Early Detection) drop packets early to prevent excessive queuing.

  2. Enable Low-Latency Buffering

    • Reduce buffer size in applications like VoIP, streaming, and gaming to minimize delay.

  3. Implement Adaptive Bitrate Streaming (ABR)

    • Dynamically adjust video quality to match available bandwidth, reducing buffering.

  4. Increase Network Bandwidth

    • Upgrade network capacity to prevent excessive queuing at routers.

2. Processing Delay

The time taken by routers, switches, or end devices to process an incoming packet before forwarding it.

  • Router/switch performance – More powerful devices process packets faster.

  • Packet header complexity – Encrypted or large headers require more processing.

  • Network congestion – Overloaded devices slow down processing.

Example

  • A firewall inspecting a packet’s content might introduce 5 ms of processing delay.

How to Reduce Processing Delay?

  • Use faster routers and network devices.

  • Optimize routing tables to reduce lookup time.

  • Use stateless packet filtering instead of deep inspection when security allows.

PreviousNetworking MetricsNextScenario

Last updated 3 months ago

Was this helpful?

DNS Resolution Delay is the time taken to convert a domain name (e.g., ) into an IP address before initiating communication. A slow DNS resolution process can delay website loading and API requests.

www.google.com