DAILY NEWS

Stay Ahead, Stay Informed – Every Day

Advertisement
Internet Architecture – DEV Community



Internet Architecture describes how data is organized, transmitted, and managed across networks. Different architectural models serve different needs, some offer a straightforward client-server setup (like a website), while others rely on a more distributed approach (like file-sharing platforms).

Peer-to-Peer (P2P) Architecture

This is when computers and devices are linked directly to each other without the need for a central server. This system can be fully decentralised or partially centralized as the server does some tasks but doesn’t host any of the data. This setup allows nodes to communicate directly with each other, sharing resources such as files, processing power, or bandwidth, without the need for a central server.

For example, three friends finished college and want to share their college photos with eachother. Instead of uploading all the photos to a single website or server, each of them sets up a folder on their own computer that can be accessed by the others. They use a file-sharing program that connects their computers directly.

First, they install a Peer-to-Peer (P2P) file-sharing application on their computer and then select the folder containing the photos to share with the other friends. Everyone preforms the same setup on their computers and once everyone is connected though the P2P application, they can all browse and download photos directly from the other’s shared folders. This allows for a direct exchange of files without the need for a central server.

A popular example of Peer-to-Peer (P2P) architecture is torrenting, as seen with applications like BitTorrent. In this system, anyone who has the file, referred to as a seeder, can upload it, allowing others to download it from multiple sources simultaneously.

Advantages

Scalability – Adding more nodes can increase total resources (storage, CPU, etc.).
Resilience – If one node goes offline, others can continue functioning.
Cost distribution – Resource burden, like bandwidth and storage, is distributed among peers, making it more cost-efficient.

Disadvantages

Management complexity – Harder to control and manage updates/security policies across all nodes
Potential reliability issues – If too many peers leave, resources could be unavailable.
Security challenges – Each node is exposed to potential vulnerabilities.

Client-Server Architecture

This model is one of the most widely used architectures on the Internet. Clients(user devices) send requests, such as a web browser asking for a webpage, and the severs then respond to these requests, like a web server hosting that webpage. This model typically involves centralized servers where data and applications reside, with multiple clients connecting to these servers to access services and resources.

Say, you want to check the weather forecast on a website. You start by opening the web browser on you phone or computer, and proceed to type in the website’s name, e.g., weather.com. When we press enter, the browser sends a request over the Internet to the server that hosts weather.com. This server, a powerful computer set up specifically to store the website’s data and handle requests, receives the query and processes it by locating the requested page. It then sends back the data (regarding the request) to our browser, which receives this information and displays the webpage, allowing us to see the latest weather updates.

Single-Tier Architecture

In a single-tier architecture, the client, server, and database all reside on the same machine. This setup is straightforward but is rarely used for large-scale applications due to significant limitations in scalability and security.

Two-Tier Architecture

The two-tier architecture splits the application environment into a client and a server. The client handles the presentation layer, and the server manages the data layer. This model is typically seen in desktop applications where the user interface is on the user’s machine, and the database is on a server. Communication usually occurs directly between the client and the server, which can be a database server with query-processing capabilities.

Three-Tier Architecture

A three-tier architecture introduces an additional layer between the client and the database server, known as the application server. In this model, the client manages the presentation layer, the application server handles all the business logic and processing, and the third tier is a database server. This separation provides added flexibility and scalability because each layer can be developed and maintained independently.

N-Tier Architecture

In more complex systems, an N-tier architecture is used, where N refers to any number of separate tiers used beyond three. This setup involves multiple levels of application servers, each responsible for different aspects of business logic, processing, or data management. N-tier architectures are highly scalable and allow for distributed deployment, making them ideal for web applications and services that demand robust, flexible solutions.

Advantages

Centralized control – Easier to manage and update.
Security – Central security policies can be applied.
Performance -Dedicated servers can be optimized for their tasks.

Disadvantages

Single point of failure – If the central server goes down, clients lose access.
High Cost and Maintenance – Setting up and sustaining a client-server architecture is expensive, requiring constant operation and expert management , making it costly to maintain.
Network Congestion – High traffic on the network can lead to congestion, slowing down or even disrupting connections when too many clients access the server simultaneously.

Hybrid Architecture

A Hybrid model blends elements of both Client-Server and Peer-to-Peer (P2P) architectures. In this setup, central servers are used to facilitate coordination and authentication tasks, while the actual data transfer occurs directly between peers. This combination leverages the strengths of both architectures to enhance efficiency and performance.

For example, when you open a video confrencing app(eg. Zoom) and log in, the username and password are verified by central servers, which also manage the session by co-ordinating who is in the meeting and controlling access. Once you are logged in and the meeting begins, the video and audio data is transferred directly between your device and other’s, bypassing the central server. This reduces lag and enchances the video quality. By using the central server for initial connection and control tasks, while the bulk of data transfer occurs in a peer-to-peer style, you can reduce the server load and leverage direct, fast connections between peers.

Advantage

Efficiency – Relieves workload from servers by letting peers share data.
Control – Central server can still manage user authentication, directory services, or indexing.

Disadvantage

Complex Implementation – Requires more sophisticated design to handle both centralized and distributed components.
Potential Single Point of Failure – If the central coordinating server fails, peer discovery might stop.

Cloud Architecture

Cloud Architecture refers to computing infrastructure that is hosted and managed by third-party providers, such as AWS, Azure, and Google Cloud. This architecture operates on a virtualized scale following a client-server model. It provides on-demand access to resources such as servers, storage, and applications, all accessible over the Internet. In this model, users interact with these services without controlling the underlying hardware.

Services like Google Drive or Dropbox are some examples of Cloud Architecture operating under the SaaS (Software as a Service) model, where we access applications over the internet without managing the underlying hardware. Below are five essential characteristics that define a Cloud Architecture.

Characteristic

On-demand self-service – Automatically set up and manage the services without human help.
Broad network access – Access services from any internet-connected device.
Resource pooling – Share and allocate service resources dynamically among multiple users.
Rapid elasticity – Quickly scale services up or down based on demand.
Measured service – Only pay for the resources you use, tracked with precision.

Advantages

Scalability – Easily add or remove computing resources as needed.
-Reduced cost & maintenance – Hardware managed by the cloud provider.
-Flexibility – Access services from anywhere with Internet connectivity.

Disadvantages

Vendor lock-in – Migrating from one cloud provider to another can be complex.
Security/Compliance – Relying on a third party for data hosting can introduce concerns about data privacy.
Connectivity – Requires stable Internet access.

Software-Defined Architecture (SDN)

Software-Defined Networking (SDN) is a modern networking approach that separates the control plane, which makes decisions about where traffic is sent, from the data plane, which actually forwards the traffic. Traditionally, network devices like routers and switches housed both of these planes. However, in SDN, the control plane is centralized within a software-based controller. This configuration allows network devices to simply execute instructions they receive from the controller. SDN provides a programmable network management environment, enabling administrators to dynamically adjust network policies and routing as required. This separation makes the network more flexible and improves how it’s managed.

Advantages

Centralized control – Simplifies network management.
Programmability & Automation – Network configurations can be changed quickly through software instead of manually configuring each device.
Scalability & Efficiency – Can optimize traffic flows dynamically, leading to better resource utilization.

Disadvantages

Controller Vulnerability – If the central controller goes down, the network might be adversely affected.
Complex Implementation – Requires new skill sets and specialized software/hardware.



Source link

PCIe Device Passthrough: NIC Name Instability and MAC Pinning



My Proxmox node rebooted, and suddenly the host was unreachable via SSH. I had to plug in a physical monitor and keyboard only to find that my primary network interface, which had been enp4s0 for months, had decided to rename itself to enp5s0.

Because my /etc/network/interfaces file was explicitly tied to enp4s0, the bridge didn’t come up, the IP wasn’t assigned, and I was locked out of my own hardware.

What I expected

I expected the Linux kernel to consistently enumerate my PCIe devices. In a static hardware environment where nothing has moved, the PCI bus address should be deterministic. If the NIC is plugged into the same slot and the BIOS hasn’t changed, enp4s0 should stay enp4s0 forever. This is the “happy path” most documentation assumes.

What actually happened

The reality is that PCIe enumeration is not always a constant. I’m using a mix of onboard NICs and a PCIe expansion card. I also have a GPU passed through to a VM.

The surprise here is how the kernel’s predictable network interface naming (systemd-udevd) interacts with the PCIe topology. When I added a new PCIe device and tweaked some BIOS settings for IOMMU, the way the kernel mapped the physical slots to the virtual naming changed. A slight shift in how the PCIe switch reported the devices caused the index to jump.

This isn’t just a “one-time fluke.” If you’re running a multi-node cluster or using GPUs that might move addresses (something I’ve documented before in GPU PCI Address Instability), you’ll find that the kernel is surprisingly flexible with where it puts things.

The root cause is that enp4s0 is a name derived from the PCI location. If the location changes—even by one digit—the name changes. If your network config depends on that name, your system is one reboot away from a blackout.

The Fix: MAC Pinning

The only way to stop this is to stop relying on the PCI slot location and start relying on the hardware’s unique identifier: the MAC address.

I decided to use systemd .link files. This allows me to tell the kernel: “I don’t care where this device is on the PCIe bus; if it has this MAC address, call it eth0.”

1. Identify the MAC address

First, I had to find the actual MAC of the problematic NIC while I had console access.

ip link show

Enter fullscreen mode

Exit fullscreen mode

I looked for the interface that was currently named enp5s0 (the “wrong” name) and copied the link/ether value.

2. Create the .link file

I created a custom link file in /etc/systemd/network/. I chose the name 10-lan.link to ensure it loads early in the boot process.

# /etc/systemd/network/10-lan.link
(Match)
MACAddress=00:11:22:33:44:55

(Link)
Name=eth0

Enter fullscreen mode

Exit fullscreen mode

(Note: I’ve anonymized the MAC address above. Use your actual hardware MAC here.)

3. Update the network configuration

Once the interface is pinned to eth0, I had to update the Proxmox network configuration to match. I edited /etc/network/interfaces to replace the volatile enp4s0 with the stable eth0.

# Example snippet from /etc/network/interfaces
auto eth0
iface eth0 inet manual

auto vmbr0
iface vmbr0 inet static
address 10.0.0.x/24
gateway 10.0.0.1
bridge-ports eth0
bridge-stp off
bridge-fd 0

Enter fullscreen mode

Exit fullscreen mode

4. Apply and verify

I ran systemd-networkd-restart (or just rebooted, since I was already at the console) and verified the name with ip a. The NIC was now consistently eth0, regardless of whether the PCIe bus shifted.

Why this matters

If you’re just running a single VM on a desktop, this is a minor annoyance. But if you’re building a production-grade homelab, this is a critical failure point.

You’ll hit this specifically in these scenarios:

Adding/Removing PCIe Hardware: Adding a new NVMe drive or a GPU can shift the enumeration of other devices on the same root complex.

BIOS Updates: A BIOS update often resets PCIe lane bifurcation or IOMMU settings, which can completely reorder how the kernel sees your NICs.

Using PCIe Switches: Some high-end motherboards or riser cables use PCIe switches that can report different topologies depending on the power state of the devices.

The Tradeoff

The tradeoff here is that you’re moving away from the “modern” predictable naming convention back to the “old” ethX style. Some people find eth0 ugly or outdated, but in a headless server environment, “ugly” is better than “unreachable.”

I’ve also seen people try to fix this using udev rules in /etc/udev/rules.d/. While that works, .link files are the native systemd way to handle this and are generally cleaner to maintain.

Lessons Learned

The biggest lesson here is that documentation for Proxmox and Debian assumes your hardware topology is a constant. It isn’t.

When you’re doing complex things like PCIe passthrough—which I’ve detailed in my GPU Passthrough Gotcha Guide—you are intentionally messing with the PCI bus. You’re telling the host kernel to ignore certain devices so the VM can claim them. This volatility is a side effect of that power.

If you are passing through NICs or GPUs, do not trust the default interface names. Pin your critical management interfaces to their MAC addresses immediately. It takes five minutes to set up and saves you from a midnight trip to the server rack because a reboot decided your network card now lives at enp6s0.

For those of you managing larger fleets or complex AI agent infrastructure, this kind of hardware-level stability is the foundation. You can’t build a reliable multi-agent AI pipeline if the underlying Kubernetes worker nodes are randomly losing their network identity.

Next time you’re configuring a new node, don’t just copy the enpXsX name from the GUI. Take the extra step to pin it. Your future self will thank you when the next BIOS update doesn’t break your entire cluster.



Source link