Should You Build Your Own Ad Server?
The question is not whether you can write it. It is whether you want to still be maintaining it in three years.
The short version
- An ad server does three things: it takes a request, decides which advertisement to show, and records what happened.
- The serving logic is the small part. Reporting, billing, a self-serve advertiser portal, creative approval and uptime are where the work actually is.
- Building is the right call when ad selection is your product, when your logic is genuinely unusual, or when you serve at a volume where per-impression pricing costs more than your own machines.
- Revive is free, open source and self-hosted, and it has no self-serve advertiser portal, which makes it the middle option between building and buying.
- The real cost of a built ad server is not the build. It is that somebody has to keep it running every month for as long as it serves advertisements.
Almost no publisher should build their own ad server. The part that picks an advertisement is a weekend of work, and everything around it, the counting, the reporting, the billing, the advertiser portal and the uptime, is the rest of the job, which never finishes.
That is the short answer and it is not a dismissal. Plenty of good engineers have built one and some of them were right to. This post is the parts list, so you can price the decision rather than guess at it.
What are you actually building?
An ad server takes a request from a page, decides which advertisement to return, sends it back, and writes down what happened. Put like that it sounds like an afternoon, and the first version genuinely is.
You can have a prototype running quickly. A table of campaigns, a query that drops the ones that do not match, a pick, an image tag returned, a row written to a log. It will serve an advertisement to a real page. It will also be nowhere near something you can send an invoice from.
What is left after the prototype works?
The honest way to cost a build is to list the parts nobody demos, because those are the ones that take the year.
| Part | What it has to do | Where it gets hard |
|---|---|---|
| Serving | Return the right creative fast, to readers anywhere | It has to answer in tens of milliseconds, on pages you do not control, at three in the morning, forever. |
| Counting | Record each impression and click exactly once | Retries, caches, bots and double fires all inflate the number you are invoicing from. |
| Reporting | Show you and the advertiser the same figures | Turning millions of rows into a chart that loads is its own project, and it arrives the month you get busy. |
| Advertiser portal | Let a buyer register, pay, upload artwork and go live without you | The largest single piece, and the one most builds never reach. |
| Money | Take payment, hold credit, apply spend, produce an invoice | Financial code has to be right every time rather than usually, and mistakes here are visible to customers. |
| Trust and safety | Approve creatives, cap frequency, filter obvious fraud | Adversarial, which means it is never finished, only current. |
The first row is the only one most people are picturing when they say they will build an ad server.
None of these are research problems. Every one of them is a fortnight you did not plan, and the advertiser portal is closer to a quarter. If you have built a payments flow before, you already know which of these lines is lying about how long it takes.
When is building genuinely the right call?
There is a real case and it deserves stating properly, because the argument against building is usually made by people with software to sell.
Build when ad selection is the product rather than the plumbing. If what decides which advertisement appears is your idea, matching on data only you hold, or arranging demand in a way no product models, then you should not rent the decision engine. That is the business.
Build when the volume is large enough that per-impression pricing is genuinely more expensive than machines you run yourself. That threshold is much higher than people assume, and it is arithmetic rather than opinion, so work it out rather than feeling it.
Build when you need to depend on nobody. Nothing you own can re-price you, deprecate a feature you built on, or decide next year that your vertical is now restricted. For publishers in industries that keep getting dropped, that is not paranoia, it is experience.
Reasons to build, and reasons that only look like reasons
- Ad selection is your product, and the logic is unusual enough that no existing platform expresses it.
- Your volume is high enough that per-impression pricing really does cost more than running your own servers.
- You have somebody whose job includes keeping it up, and it is not also the person writing the site.
- It looks like a weekend project. The first version is. The version you can bill from is not.
- The monthly fee feels like a lot. Work out the hourly value of the time you will spend instead, then compare.
- You want your own branding on it. That is what white-label software already does, with no build at all.
What about self-hosting something that already exists?
This is the option that gets skipped, so it is worth pricing properly.
Most people weighing this are not choosing between nothing and a monthly fee. They are choosing between a monthly fee and an evening a month, plus a sales process that runs through their inbox. See the full assessment of Revive.
What does buying cost, for comparison?
Published entry prices for white-label ad servers run from roughly $29 to roughly $500 a month, and the advertised figure is frequently not the price, because the self-serve portal is often a separate charge with a percentage attached. Pyrobid is $29.99 a month to one million impressions and $99.99 to five million, with the portal, your own branding and the full targeting set in both plans, and no revenue share on your direct deals. See what a white-label ad server really costs.
A worked example, with your own numbers to be substituted. Say your time is worth $50 an hour and a build takes two hundred hours before it can take a payment. That is $10,000, or about twenty eight years of the $29.99 plan. Two hundred hours is also optimistic for the parts list above.
The figure is not the point. The order of magnitude is, and it does not change much when you move the inputs around.
The argument that actually decides it
Everything so far has been about the build. The build is the part you can plan, and it is not the part that gets people.
The build is a fixed cost you pay once. The maintenance is a variable cost you pay in attention, every month, for as long as the thing serves advertisements.
An ad server is infrastructure that other people's money flows through, and that gives it a property ordinary side projects do not have. It cannot be left alone.
What maintenance means in practice is a list nobody puts in the estimate. A browser ships a change and your tag stops rendering on one platform, and you hear about it from an advertiser rather than from a test. Somebody works out how to fire your impression endpoint in a loop and you bill a client for traffic that was not real. The reporting query that was comfortable at a hundred thousand rows a month is not comfortable at four million. A dependency gets a security advisory and you are the security team. You go on holiday, and advertisements either keep serving or they do not.
None of that is difficult. All of it is unscheduled, and it arrives on days you had planned to write something, or sell something, or rest. Ad serving is the kind of software where the interesting work is finished long before the work is.
So the honest question is not whether you can build an ad server. It is whether, in three years, you still want to be the person who gets woken when it stops. If ad serving is the product you are in business to make, then yes, build it, and enjoy it. If what you actually wanted was to sell space on your own site at your own prices, the build is a long detour away from the part that pays, which is finding advertisers.
Your own ad sales portal, live in five minutes
Advertisers sign up, add funds and build their own campaign. You approve the creative before it runs. Your existing ads keep running underneath as the fallback, so nothing comes down while you try it.
Start free trial14 days free. Your existing ads keep running. Cancel anytime.