Network security and load balancing
OCI Foundations · Lesson 7 of 15 · 48:59
YouTube loads only after you press play. This chapter opens at its timestamp in the full course. Watch on YouTube ↗
Learning with these videos? Subscribe for new courses and exam-style questions.
Subscribe on YouTube (opens in a new tab)In this lesson
Prepare for the Oracle Cloud Infrastructure Foundations Associate exam (1Z0-1085-26). In this lesson: security lists and network security groups, stateful and stateless rules, the Load Balancer and the Network Load Balancer, and public versus private load balancers. Includes three original practice questions, with Kettlebrook Fitness, a fictional gym chain, as the example.
Study notes
The text of this lesson, to read at your own pace. Information as of November 2026.
Which traffic gets in?
Kettlebrook's booking website now runs on web servers in a public subnet, with the member database in a private subnet. Next, the team must decide which traffic each server accepts, and spread the visitors across the web servers. This lesson covers security lists, network security groups, and load balancers.
Security rules and security lists
Security rules act as virtual firewalls: each rule allows one type of traffic, coming in or going out, with a source or a destination, a protocol, and ports. Without a rule that allows it, no traffic goes through. A security list applies its rules to every VNIC in a subnet, and a subnet can use up to five security lists. Each VCN comes with a default security list, which allows SSH on port twenty two, a few ICMP messages, and all outgoing traffic. And even though a security list is set on the subnet, its rules are enforced on the VNIC of each instance.
Network security groups
A network security group, or NSG, applies its rules only to the VNICs that you add to it, like the web servers, wherever they are in the VCN. A rule can even use another NSG as its source or destination, for example, traffic from the NSG of the web servers to the NSG of the database. A VNIC can belong to up to five NSGs, and load balancers and database systems can use NSGs too. Oracle recommends NSGs over security lists, because they follow the security needs of each tier, not the layout of the subnets.
Stateful and stateless rules
Each rule is stateful or stateless. With a stateful rule, OCI tracks each connection, so the response is allowed automatically, even with no rule in the other direction. With a stateless rule, nothing is tracked, so you need a matching rule for the response traffic. Stateful is the default, and the simplest choice. But each instance can track only a limited number of connections, so for a very large volume of traffic, like a busy website behind a load balancer, stateless rules avoid that limit.
The load balancer
A load balancer gives your clients a single entry point, and spreads their traffic across several backend servers, which improves availability and lets you scale. The Load Balancer service acts as a reverse proxy, at layer seven for HTTP and HTTPS, or at layer four for TCP, and it can decrypt SSL traffic on behalf of the servers. A listener receives the incoming traffic, a backend set groups the servers, and health checks make sure that traffic goes only to healthy servers. A public load balancer has a public IP address and sits in a public subnet, while a private load balancer has only a private address, for traffic inside your networks. And its bandwidth is flexible, up to eight gigabits per second.
The network load balancer
The Network Load Balancer service works differently: it is not a proxy, and it passes traffic through, at layers three and four. It preserves the source IP address of the client, so the servers see who connects. It is built for speed, high throughput, and long-running connections, it can go beyond eight gigabits per second, and it is part of the Always Free tier. So choose a load balancer for websites and HTTP features, and a network load balancer when the servers need the address of the client, or for very fast and long connections.
Recap
Let's recap. Security rules allow traffic, and without a rule, nothing goes through. Security lists apply to every VNIC in a subnet, while network security groups apply to the VNICs that you choose, and Oracle recommends them. Stateful rules allow responses automatically, and stateless rules avoid the limit of connection tracking for very large volumes. The load balancer is a reverse proxy at layers seven and four, with listeners, backend sets, and health checks, public or private. And the network load balancer passes traffic through, and preserves the source IP address of the client.
Quick checks for this lesson
The 3 questions of this lesson, as plain text. The button above runs them with shuffled choices and the reason behind every choice.
Kettlebrook’s web servers and an admin server share one subnet, but only the web servers must accept traffic on port 443. What fits best?
- A rule in the subnet’s security list
- A network security group for the web servers
- A route table rule to the web servers
- A NAT gateway for the subnet
Show the answer
A network security group for the web servers
A network security group applies its rules only to the VNICs that you add to it, so only the web servers accept that traffic. “A rule in the subnet’s security list” would apply the rule to every VNIC in the subnet, the admin server included. “A route table rule to the web servers” would decide where traffic is sent, not which traffic is allowed. And “A NAT gateway for the subnet” would only let servers without public addresses start connections to the internet.
When one of Kettlebrook’s web servers stops responding, the load balancer must stop sending visitors to it, without any action from the team. What makes this happen?
- A listener on port 443
- A backend set with more servers
- A stateless security rule
- Health checks on the backend servers
Show the answer
Health checks on the backend servers
Health checks test each backend server, and the load balancer sends traffic only to the healthy ones. “A listener on port 443” would receive the incoming traffic, without checking the servers. “A backend set with more servers” would add servers, but the failed one would still get visitors. And “A stateless security rule” would change how the firewall tracks connections, not where the traffic goes.
Kettlebrook’s member app servers must receive each connection with the client’s own source IP address, to block abusive addresses. Which service fits?
- A network load balancer
- A load balancer at layer 7
- A NAT gateway
- A service gateway
Show the answer
A network load balancer
The network load balancer passes traffic through, and preserves the source IP address of the client. “A load balancer at layer 7” would act as a reverse proxy, so the servers would see connections coming from the load balancer. “A NAT gateway” would only carry connections that the servers start toward the internet. And “A service gateway” would reach Oracle services, not spread client traffic.