What API Hosting Is
TL;DR
API hosting is the process, address, and certificate that let a client open a connection to an API. The API is the contract. Hosting is where a process that implements the contract is running.
API
Hosting
Reachable
API hosting is where an API runs so clients on the internet can reach it. The API is the contract: paths, methods, and bodies. Hosting is the process that implements that contract, plus the name, certificate, and network path a client uses to open a connection.
A client does not reach an API in the abstract. It resolves a name, completes TLS, and sends HTTP to a process. If any of those is missing, the API is not hosted at that name.
What has to be in place
Four pieces make a process reachable.
A process that accepts requests. It might stay listening, or a platform might invoke it per request. Either way, something has to produce the response.
A DNS name. Clients need a name that keeps working when you replace machines. Point the name at the load balancer or other stable address, not at one instance you plan to destroy.
A certificate for that name. Browsers and API clients check the name against the certificate. See TLS. Terminating TLS at a proxy you control lets the app process listen on a private port.
A health check in front of user traffic. A load balancer should send a request only to a process that has answered a health check. The check is part of hosting. It is not a product endpoint, and a check that always returns success will send users to a process that cannot do the work.
A process that stays up
This process listens until you stop it. The host chooses the port. /health is for the proxy. The public hostname and the certificate live on that proxy, not in this file.
PORT has to be the port the proxy forwards to. Binding a port nobody routes to does not host the API. Returning ok from /health while the database is unreachable tells the proxy to send real traffic to a process that will fail those calls. Check the dependency you actually need, or use a separate readiness check that can fail without pretending the process is ready.
Where the process can run
A virtual machine. You get an operating system. You patch it, you restart the process on deploy, and you can log in. Idle capacity is the size of the machine, whether or not requests are arriving.
A container. You ship an image, and a host runs it. Containerization is that packaging. You still need a host, a registry, and something that restarts the container. You usually rebuild the image when the base image changes, instead of patching a guest operating system in place.
A function. The platform runs the code for a request and may stop it when idle. That is serverless hosting. Nothing of yours calls listen(). Cold starts and a maximum duration are part of the choice. The public name and the certificate are still yours to point at that platform.
Autoscaling changes how many copies run. It does not choose the name, the certificate, or where the data lives. Hosting is the fact that the copies run somewhere a client can reach.
"Often none" describes the usual scale-to-zero setting. A function platform that you configure with a minimum instance reserves that instance. Read the setting. Do not assume every function host drops to zero.
Replacing a version
A deploy is a hosting change. Start the new process, wait until its health check passes, send traffic, then stop the old process. Blue-green deployment keeps the old process up and moves the router. A rolling replacement swaps copies inside one pool.
People use those strategies when they want a release that does not take the service offline. The name for that goal on this site is zero-downtime API deployment. None of the strategies promise that no request fails. A bad build that passes a shallow health check still receives traffic. A connection that outlives the drain period is still cut.
What hosting does not decide
Hosting does not design the resources, decide who may call, or store the only copy of your data. Disk on the instance disappears when the instance is replaced. Put data in a service that outlives one deploy.
Hosting also does not make a private process public. A container running on a laptop, or a pod with no ingress, implements the API and is still unreachable to clients on the internet. The name, the certificate, and a route are the rest of the definition.
Questions & Answers about API Hosting
API hosting is where an API runs so clients on the internet can reach it. That includes the process that handles requests, the DNS name clients use, the TLS certificate for that name, and the path from the client to a healthy process. The paths and JSON bodies are the API. Hosting is the machinery that answers.
