Bruno Pedro
API deployment options
How do you deploy your API?
One of the challenges that I’ve been hearing is related to API deployment to different environments. Specifically, how do you decide what environments to have, what technologies to use, and how to automate the deployments?
From my experience, the environments you have depend on the stage of your company and the stage of your API. Here are some examples of different maturity stages:
- API Design: if you’re validating an API Design with stakeholders you can simply use a mock server. You can build one yourself or use any available tools. If you choose to use an existing tool you don’t have to deploy anything.
- API Prototype: at this stage, you probably want to launch a minimal environment that lets stakeholders experiment with your API. This environment should help you detect performance bottlenecks and understand what you need to improve in a real production system.
- API QA: I recommend that you have a dedicated environment just for QA. Why? Because many types of QA tests are destructive and you wouldn’t want to do that in a production environment. The QA environment should resemble as much as possible your final production environment.
- API Deployment: The stage that most people look forward to is the one where you finally have your API generally available. The production environment should be built from the learnings of the prototype stage and fixing any issues detected during QA.
Other than these, some companies also use a development environment that teams use to test what they’re building. Local environments are also helpful because they help developers test their code on their own machines.