CLOUD CONCEPT

OSI Model

The OSI Model is a seven-layer reference framework for understanding how networked systems exchange data, from physical transmission to application protocols.

Cloud Concepts Hub →

What is OSI Model

The Open Systems Interconnection model separates networking responsibilities into layers so engineers can reason about connectivity, traffic handling, and failures. In cloud architecture, it helps distinguish IP routing, transport-level load balancing, and application-aware routing, which is essential when choosing an appropriate and cost-effective load balancer.

The OSI Model describes network communication through seven conceptual layers. Layer 1, physical, concerns transmitting signals over media. Layer 2, data link, concerns local delivery using frames and link-layer addressing. Layer 3, network, concerns logical addressing and routing, commonly using IP. Layer 4, transport, concerns communication between endpoints through protocols such as TCP and UDP. Layer 5, session, concerns managing communication sessions. Layer 6, presentation, concerns data representation, encoding, and related transformations. Layer 7, application, concerns protocols used by applications, such as HTTP and DNS.

This is a reference model, not a requirement that every implementation contain seven separate components. Internet protocols follow the TCP/IP architecture, whose layers do not map exactly to OSI layers. Session and presentation responsibilities are often implemented within application libraries and protocols. Cloud infrastructure also abstracts physical and link-layer details, but those underlying responsibilities still exist.

For cloud design, the most useful distinction is often what information a component uses to make a forwarding decision. A Layer 3 router forwards traffic according to IP routing information. A Layer 4 load balancer distributes transport flows without needing to interpret application requests. A Layer 7 load balancer understands an application protocol and can make decisions using information such as an HTTP hostname, URL path, or header.

For example, AWS Application Load Balancer operates at Layer 7 and can route requests for /orders and /images to different target groups. This allows multiple web services to share an entry point rather than requiring a dedicated load balancer for each service. Network Load Balancer operates at Layer 4 and is appropriate for transport-level traffic distribution, including TCP and UDP workloads, or requirements such as static IP addresses. It does not provide HTTP path-based routing.

Gateway Load Balancer addresses a different requirement: distributing network traffic across virtual appliances such as firewalls and intrusion detection systems. It operates at Layer 3 and uses GENEVE encapsulation over UDP port 6081 to exchange traffic with compatible appliances. The UDP encapsulation does not make its primary purpose ordinary Layer 4 application load balancing. It is not a substitute for HTTP-aware routing or a general-purpose web application load balancer.

Choose the required behavior before comparing prices. Evaluate load balancer hours, capacity-unit consumption, processed traffic, applicable data-transfer charges, and operational overhead. Sharing an Application Load Balancer can reduce duplicated infrastructure, but traffic volume and rule evaluations still affect cost. A Network Load Balancer is not automatically cheaper because it operates at a lower layer. Adding appliance inspection also introduces appliance charges, processing overhead, and additional network-path complexity.

Layer labels are useful shorthand, not complete product specifications. Network Load Balancer can terminate TLS even though it is categorized as Layer 4; TLS termination alone does not provide HTTP content routing. Similarly, forwarding encrypted HTTPS traffic does not mean a device can inspect its paths or headers without decryption. During troubleshooting, separate routing failures, transport connection failures, TLS negotiation failures, and application errors. A successful TCP connection proves neither that TLS works nor that the application can successfully serve a request.

Key aspects of OSI Model

The OSI Model helps engineers match traffic-handling requirements to the right network layer, troubleshoot systematically, and compare suitable architectures on cost.

Seven conceptual layers

The model separates physical, data link, network, transport, session, presentation, and application responsibilities. Use these boundaries to identify which part of communication an infrastructure component handles.

Encapsulation and protocol visibility

Application data travels within lower-layer protocol structures. Routing or filtering decisions depend on which headers and payload information a component can access, particularly when encryption is involved.

Layer 4 versus Layer 7 load balancing

Transport-level balancing distributes flows, while application-level balancing can evaluate individual HTTP requests. Choose Layer 7 for hostname or path routing and Layer 4 when transport protocols or endpoint requirements drive the design.

Layer 3 appliance insertion

Network-layer traffic distribution can direct IP traffic through inspection appliances. Gateway Load Balancer serves this purpose rather than replacing an application-aware load balancer.

Layered troubleshooting

Test IP reachability, transport connectivity, TLS negotiation, and application responses separately. Success at one layer does not establish that higher-layer operations are healthy.

Requirements-based cost optimization

Select the load balancing behavior the workload requires, then compare usage charges and operational costs. Neither a lower OSI layer nor a smaller feature set guarantees a lower total bill.

Cloud services for OSI Model

Amazon VPC establishes the IP routing and connectivity foundation. Application Load Balancer adds HTTP-aware routing, while Network Load Balancer distributes transport traffic when application-content routing is unnecessary or transport-specific requirements apply. Gateway Load Balancer serves a separate role by distributing traffic to inspection appliances. These services can be combined when requirements justify it, but they are not a mandatory stack. Choose the simplest topology that meets protocol, security, availability, and addressing requirements, then compare load balancer capacity charges, traffic charges, appliance costs, and operational overhead.

Virtual private cloud VPC_32 image Amazon VPC

Amazon VPC supplies the network environment in which IP addressing, route tables, and traffic controls determine connectivity. Its routing and security configuration must permit the intended traffic paths through load balancers, application targets, and inspection appliances.

Open Amazon VPC →