How to Design and Build an Ad Network
Ad networks were one of the first pieces of advertising technology (AdTech) introduced to the online advertising industry back in the mid-1990s. Despite the various technological advances and new media-buying processes — such as real-time bidding (RTB) — ad networks remain a key element of programmatic advertising.
This article covers what an ad network is, how it works, what its key features are, the build-versus-rent decision, and the main architectural and development challenges involved in standing one up.
Key Points
- An ad network is a technology platform that operates as a middleman, allowing advertisers and publishers to buy and sell digital advertising.
- An ad network gathers all available inventory from a publisher and offers it to advertisers as a bundle of impressions.
- Building a custom ad network benefits companies that have access to both supply and demand.
- Renting an existing ad network allows immediate use and has lower upfront costs, but offers no ownership or control over data, the product roadmap, or features.
- Building an ad network means owning the intellectual property (IP), building precisely the features required, and keeping client and first-party data secure.
What Is an Ad Network?
An ad network is a technology platform that operates as a middleman, allowing a group of advertisers and publishers to buy and sell digital advertising. Ad networks appeared in the mid-1990s and were among the first pioneers of advertising technology. Their purpose has remained consistent from the beginning: to help advertisers purchase available ad space across a range of publishers.
The main goal of an ad network is to collect unsold inventory — non-premium or remnant — from multiple publishers and offer it to advertisers at prices considerably lower than those publishers would otherwise charge.
That said, ad networks aren't exclusively about remnant inventory. Some offer advertisers more exclusive deals at premium prices by selecting and purchasing inventory beforehand from leading publishers, then reselling it at higher rates. This costs advertisers more, but it guarantees prime, secure placements.
How Does an Ad Network Work?
An ad network gathers all available inventory from a publisher and offers it to advertisers as a bundle of impressions. Here's a step-by-step breakdown of the process:
- The ad network partners with a large number of publishers to give advertisers access to substantial inventory volumes.
- Advertisers create campaigns using the ad network's campaign management system. They can also add pixels from a third-party ad server for verification and to consolidate reporting across campaigns running on multiple networks.
- Advertisers configure campaign settings — targeting, budget, and frequency limits. The publisher places the ad network's tags on their website either by inserting the tags directly into the page or via a first-party ad server.
- Once ads are live, advertisers can control and rotate multiple creatives through the campaign management system without needing to contact the publisher directly.
During the early stages of online advertising, when the number of websites and advertisers was limited, publishers mostly relied on a single ad network to sell unsold inventory. As publisher sites multiplied, however, it became clear that a single network couldn't fill all available inventory, leading to chronically low fill rates.
To address this, publishers began using multiple ad networks simultaneously — some for premium inventory, others for remnant.

Many ad networks specialize in certain types of inventory:
Premium ad networks: Offer inventory from top publisher brands (e.g. The New York Times).
Vertical ad networks: Focus on specific topics — business, technology, automotive, fashion, and so on.
Specialized ad networks: Focus on a particular channel type, such as mobile, video, or native.
Performance and affiliate ad networks: Use revenue share, cost-per-click (CPC), or cost-per-action (CPA) pricing models.
The targeting and decision-making processes in ad networks work similarly to those in ad servers, though with some differences. By setting targeting criteria, an advertiser can define which web traffic is relevant to a given campaign.
Who Can Benefit From Building an Ad Network?
Building a custom ad network benefits companies that have access to both supply and demand. An advertising agency with many brand clients and partnerships with multiple publishers, for example, can benefit from building its own ad network — avoiding third-party network commissions and fees while gaining full control over features and the product roadmap.
Existing AdTech vendors can also expand their client offering by building an ad network. Publishers and media companies can build one to streamline the ad buying and selling process across their own properties — websites, apps, and streaming services alike.
Key Features of an Ad Network
Traffic and audience detection and campaign matching: Identifying traffic sources and audiences, then matching them with relevant ad campaigns.
Advanced reporting: Displaying various performance metrics related to ad campaigns and audiences.
Header bidding adapter: Providing publishers with a header bidding adapter (e.g. Prebid) to access additional demand sources.
Varied ad formats: Offering advertisers a range of creative formats — display, native, and video ads.
User interface: Providing both publishers and advertisers with an easy-to-use UI for creating campaigns, managing accounts, and viewing reports.
The Main Challenges in Building an Ad Network
Any organization building an ad network should account for the following challenges before scoping out requirements:
Scale of inventory: Refers to the volume of traffic the ad network must handle. Unexpected traffic spikes can impact platform stability and performance if not planned for.
Infrastructure setup: The infrastructure must support inventory buying and selling, as well as campaign performance reporting, reliably and at scale.
Key features: Beyond the baseline features common to most ad networks — traffic detection, reporting systems — the platform needs to accommodate features specific to the client segments and use cases it serves.
Should You Build or Rent an Ad Network?
What It Means to Rent an Ad Network
Renting an AdTech or MarTech platform means signing a contract with a vendor and paying a recurring fee — typically monthly — to use the platform. This is the most common approach, as it lets businesses start using the platform immediately without building from scratch.
For many organizations, though, building is the better long-term choice.
Advantages of Renting
Immediate start: In most cases, an ad network can be operational within hours of account creation.
Lower initial costs: Many AdTech platforms take a percentage of media spend as their fee, eliminating upfront costs. Some white-label solutions or larger vendors may also charge a monthly fee on top of media spend.
Disadvantages of Renting
No control over features or product roadmap: When renting, there's little or no ability to influence current or future features, which means new capabilities requested by clients — or needed to grow the business — simply can't be added.
No ownership of the technology or data: For most agencies and brands, owning the tech stack and data isn't critical. For AdTech and MarTech companies, however, ownership is often a strategic necessity. Publishers, media companies, telecoms, and mid-to-large agencies also benefit from owning their data infrastructure — it provides complete control over system integrations, increases company value, and prevents data from being exploited by third parties.
Fees and commissions: Charging a markup ranging from 10% to 30% is common practice among AdTech providers. For organizations with high media spend or substantial ad revenue, these fees accumulate quickly. Building and maintaining a custom platform involves upfront cost, but the long-term savings can be significant.
What It Means to Build an Ad Network
Building a custom ad network means undertaking a software development project that covers platform design, feature development, integration setup, and UX/UI design.
The time required depends on factors such as budget, timeframes, feature set, and technical complexity. Simpler projects typically take four to six months; more complex builds can run 18 months or longer. The number of developers assigned to the project is a meaningful variable — more developers generally means a faster path to a minimum viable product (MVP).
Advantages of Building
Data ownership: Controlling the data makes it easier to comply with privacy regulations such as the General Data Protection Regulation (GDPR), enables first-party data use for targeting and measurement, and eliminates the risk of competitors accessing proprietary data.
Control of intellectual property: Owning the code and algorithms can increase company valuation and competitive defensibility.
Control over the product roadmap and features: Building in-house means developing unique capabilities that differentiate the platform and align it directly with business objectives and strategy.
Reduction of fees and commissions: At 10% to 30% markups, third-party AdTech fees can represent millions in annual spend for large buyers. Building a proprietary platform eliminates or dramatically reduces these costs.
Disadvantages of Building
Large financial investment: Custom ad network development requires significant upfront capital, particularly compared to a rented solution.
Time commitment: Reaching a functional MVP may take up to six months, depending on technical requirements and the desired feature set.
Technical maintenance: Ongoing monitoring, support, and infrastructure management are ongoing responsibilities that need to be resourced internally or through a development partner.
Case Study: Building an Ad Network for an Advertising Agency
One illustrative example of ad network development involved an advertising agency whose existing ad network was missing essential features — particularly traffic detection and advanced reporting — and was experiencing performance bottlenecks.
The primary goals of the project were to:
- Optimize the ad network by building new features for traffic detection and advanced reporting.
- Improve performance by refactoring the existing codebase while ensuring backward compatibility.
- Scale daily ad request capacity from roughly 2 million to approximately 3 million.
- Establish a stable and resilient infrastructure environment.
1. Refactor the Codebase
Performance improvements began with introducing new code and refactoring the existing codebase — the only viable path to meaningful performance gains on an already-deployed platform. Backward compatibility was maintained throughout, ensuring existing processes continued to function correctly.
2. Build and Extend Key Features
The ad network was missing several key capabilities that needed to be designed and built from scratch.
Traffic Detection
The network lacked the ability to segment traffic and redirect those segments to specific campaigns. As a result, visitors were being shown non-relevant ads — a loss for both publishers (missed revenue) and advertisers (wasted impressions on unqualified audiences).
A new traffic detection feature was built to segment visitors based on their profile and redirect them to the appropriate advertiser campaigns. The information collected about traffic sources includes device type, operating system, and location. Traffic is then redirected to campaigns based on defined segments, significantly improving campaign relevance and performance.
Reporting and Audience Identification
The original reporting dashboard provided limited visibility into traffic sources from publishers, making it difficult to accurately identify which audiences were driving the most conversions. Compounding the problem, data was aggregated only once per hour — significantly reducing its freshness and reliability for optimization decisions.
A new reporting system was designed and built to allow teams to dynamically group, filter, sort, and drill down into data across multiple dimensions — including location, ISP, operating system, and device — as well as subdimensions such as campaign, advertiser, and traffic category.
Detailed reports can be displayed in the ad network's UI, sent by email, or exported to CSV or data visualization tools, making campaign optimization considerably more efficient.
Reporting System Infrastructure Improvements
Expanding the reporting capabilities involved:
- Implementing infrastructure changes to improve performance and surface metrics more quickly.
- Designing the reporting logic to support dynamic group filtering.
- Introducing drill-down dimensions (e.g. location, ISP, operating system, and device).
- Adding subdimensions (e.g. campaign, advertiser, and traffic category).
This included configuring Amazon Redshift for horizontal scaling and utilizing other Amazon Web Services (AWS) components.
Results
Increase in Daily Requests
After redesigning the infrastructure, the ad network scaled from handling approximately 2 million daily requests to about 3 million. With continued infrastructure improvements, the platform reached the capacity to handle approximately 100 million requests per day — around 4.1 million per hour.
Stable Infrastructure
The infrastructure was originally maintained by an external provider. Following a transition of technical responsibilities, the infrastructure was redesigned and new services were introduced, resulting in improved stability and performance.
Infrastructure Redesign Outcomes
Redesigning the infrastructure enabled a microservices architecture with the following characteristics:
Elimination of single points of failure / high availability: If one service fails, it does not affect the rest of the system.
Horizontal scaling: When traffic increases, new instances are added to handle the additional workload — a pattern well-suited to Amazon Redshift and the broader AWS ecosystem.
The decisions involved in ad network design — from architecture and feature prioritization to the build-versus-rent question — ultimately come down to the organization's business model, data strategy, and long-term goals. For companies sitting at the intersection of supply and demand, or those with high media spend and a need for data control, a custom-built ad network often delivers returns that justify the investment.