The Open Systems Interconnection (OSI) model is a framework for organizing the entire networking and communication stack into seven distinct layers. Each OSI layer serves a unique purpose in data transmission—while collectively forming a hierarchy based on abstraction. 

For example, the uppermost layer of the OSI model (the application layer) sits closest to the user and handles the bulk of client-server communication, while the bottom layer (the physical layer) encompasses data transmission over hardware mediums. And although every layer works differently, they're organized in a way that enables inter-layer communication.

Despite its importance, the OSI model is not the strict standard used across the web. The TCP/IP model—a protocol-based framework for transferring data between devices—has immense popularity and fills many remaining functional gaps. Conversely, that model splits things into network, internet, transport, and application layers. 

The Open Systems Interconnection (OSI) model was created in 1984 and published by the International Organization for Standardization (ISO), which also oversees worldwide technical innovations in many areas. Aside from abiding by this standard, the OSI model isn't governed by a central body and exists conceptually as a de facto standard.

How does the Open Systems Interconnection (OSI) model work?

The OSI model gives organizations a blueprint for establishing and organizing pieces of their networking infrastructure. It helps determine how data transmission occurs over the network, how hardware and software interact, and how teams assemble their application stacks. 

The seven layers of the OSI model are as follows, numbered accordingly: 

  1. Physical layer – Includes hardware and equipment used for data transfers—such as cables, switches, signaling mechanisms, connectors, and more—while also being responsible for translating data bit streams into a binary 0s and 1s format

  2. Data link layer – Enables data transfers between devices on a shared network, breaks packet data into smaller transmissible units called "frames," and includes mechanisms for flow control and error correction

  3. Network layer – Governs communication between two separate networks (shared networks are excluded), determines the best communicative pathways for data exchange, and breaks up blocks of data into portable units called "packets"

  4. Transport layer – Enables end-to-end communication between two devices and breaks up data into segments prior to transmission, delivers performance-based flow control, and handles reassembly of data segments on receiving devices

  5. Session layer – Manages opening and closing of connections between devices, enabling complete message exchange for the duration of the session. It also allows for checks at configured thresholds to promote transfer resumption following accidental disconnects. 

  6. Presentation layer – Prepares data for the application layer via translation, encryption, and compression (to reduce payload sizes). It allows devices using mismatched encoding or decoding methods to parse data effectively, making that data readable to the receiving device. 

  7. Application layer – The top layer which is responsible for human-computer interaction (client-server communication), data transmission via requests and responses, and presentation of important information to end users

Each layer from top to bottom is dependent on its predecessor to form a working data transmission chain. Not all applications or systems operate at each OSI layer, but some layers (such as Layer 4 or Layer 7) support critical functions such as load balancing. 

That said, we often associate different OSI layers with unique internet protocols based on how they function. Here are the OSI layers and common protocols (or technologies) typically associated with them: 

  • Physical layer: Cables (ethernet, fiber optic, etc.), modems, switches, busses, DSL, and others

  • Data link layer: Link Layer Discovery Protocol (LLDP), Local Area Network (LAN), Address Resolution Protocol (ARP), Multi-link Trunking Protocol (MLT), Point-to-Point Protocol (PPP), and others

  • Network layer: IPv4 and IPv6, IPsec, Internet Control Message Protocol (ICMP), Network Address Translation (NAT), Virtual Router Redundancy Protocol (VRRP), and others

  • Transport layer: TCP, UDP, QUIC, Stream Control Transmission Protocol (SCTP), Datagram Congestion Control Protocol (DCCP), and others

  • Session layer: NetBIOS, Server Message Block (SMB), Remote Procedure Call (RPC)

  • Presentation layer: SSL/TLS, Apple Filing Protocol (AFP)

  • Application layer: HTTP, HTTPS, Dynamic Host Configuration Protocol (DHCP), Domain Name System (DNS), Simple Object Access Protocol (SOAP), Representational State Transfer (REST), Simple Mail Transfer Protocol (SMTP), SSH, and others

Does HAProxy support the Open Systems Interconnection (OSI) model?

Yes! HAProxy products leverage broad protocol support to deliver Layer 4 and Layer 7 load balancing for a wide variety of web applications and APIs. To learn more about protocol support and OSI model support in HAProxy, check out Your Comprehensive Guide to Protocol Support in HAProxy or Layer 4 vs Layer 7 Proxy Mode (Understanding the Difference).