How to Approach Building an API Gateway Prototype?

July 23, 2025 6 answers
Asked by CuriousCoder93
I've been assigned to create a prototype for an API gateway for my company, which we plan to offer as a SaaS product. This is my first time tackling such a project, and I've been considering a few approaches: 1. Using Nginx as a reverse proxy and then implementing the business logic in Go or C/C++ while utilizing Redis pub/sub for caching. 2. Starting with a reverse proxy and evolving it into a full-fledged gateway. 3. Developing everything from scratch. Since I'm still learning the ropes, I'd appreciate any guidance or suggestions on how to think about this project and if there's a better way to approach it.

Answers

SkepticalDev22
It sounds like you might be setting yourself up for a tough ride. There are plenty of fully-featured API gateways already available. Have you researched your competitors? What will your unique selling point be?

CynicalObserver5: Right? Giving this task to a junior seems risky. I suggest looking at open-source API gateways instead. Building one from scratch in a few weeks is no small featโ€”unless youโ€™re a prodigy! Just be honest with your boss; itโ€™s okay to push back.

RealisticThinker77: Absolutely, but your boss probably wants to see something tangible. Just make sure to explain the challenges involved clearly.

Reply to this answer
CodingConnoisseur00
I suggest looking into OpenResty. You can write modules in Lua, which might be simpler to implement. Also, Go might not be your best bet unless the whole proxy is built with it. There are long-term issues with building from the ground up that you donโ€™t want to deal with.
Reply to this answer
TechInnovator11
Why reinvent the wheel? Check out APISIX as an alternative. It could fit your needs without starting a project from scratch.

GratefulDeveloper33: Thanks for the tip! Iโ€™ll definitely look into that.

Reply to this answer
InformedUser28
Check out Connexion, a great Python framework that supports spec-first development. You describe your API in OpenAPI format, and it guarantees adherence to your specifications. I used it on a lengthy project and found it useful!

CodeExplorer31: Sounds interesting! Iโ€™ll check it outโ€”appreciate the recommendation!

Reply to this answer
PracticalAdvisor44
Have you thought about exploring existing open-source API gateways first? It might save you a lot of hassle and time. You could customize one based on your needs.

LearningJourneyman92: Yeah, my senior liked Kong, so thatโ€™s been suggested, but I'm open to other options!

Reply to this answer
AnalyticalMind99
Instead of jumping into solutions, start by clearly defining the problem you're trying to solve that current providers don't cover. What does success look like for this project? Do you even have the resources to take this on? You need these answers before starting any development.

OnPointResponse88: Exactly, tackling the problem head-on is crucial before diving into solutions!

Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions