Glossary

API Server

An API server answers requests from other programs rather than people: mobile apps, front ends, partner systems and internal services send structured requests and get data back.

What is an API server?

It is the back end that exposes a defined set of operations, an application programming interface, over the network. A phone app asks for a user's orders; a checkout page asks for a shipping quote; a partner system pushes inventory updates. Each request names an operation, passes parameters, usually in JSON, and receives a structured response with a status code. The API server checks who is asking, validates the input, runs business logic, reads or writes a database and returns the result. Unlike a web server that sends HTML for humans, an API server's output is meant to be parsed by code.

Which API styles are common?

StyleTransportStrengthTypical use
RESTHTTP with JSONSimple, cacheable, works everywherePublic and mobile APIs
GraphQLHTTP, one endpointClients choose exactly the fields they needRich front ends with many views
gRPCHTTP/2 with Protocol BuffersCompact, fast, strongly typedService to service traffic
WebSocketLong-lived connectionServer can push eventsLive updates, chat, trading screens

A note on terms: this page is about API servers you run on your own machine. Our own service is ordered and managed through the panel; we do not provide an API for it.

What happens inside one request?

Typical steps, with rough costs on modern hardware: TLS handshake on a new connection (around a millisecond of CPU, reused afterwards with keep-alive); routing and authentication (microseconds for a token check, more for a database lookup); input validation; one or more database queries (often the largest share, from under a millisecond for a cached key lookup to tens of milliseconds for a complex query); serialization to JSON; logging. Most of the time a slow API is slow because of the database or a call to another service, not the API code itself.

Which numbers describe API performance?

  • Throughput: requests per second the server sustains.
  • Latency percentiles: p50 is the typical request, p95 and p99 show the slow tail users actually notice.
  • Error rate: share of 5xx responses, especially under load.
  • Saturation: CPU, connection pool and database usage while under load.

Measure with a load tool such as wrk, k6 or hey from a second machine, and raise the load until p99 latency climbs sharply; that knee is your practical capacity. Check CPU usage and load helps read the server side while the test runs.

How should I size a machine for an API?

It depends on the runtime and what each request does.

  • Node.js and Python (async): each process mostly uses one core, so run one process per core behind a process manager or a reverse proxy. High clock speed helps: S1 runs at Intel Xeon E-2276G with 6 cores.
  • Go, Java, .NET, Rust: one process uses all cores. More cores add throughput: S11 has 24 cores and 32 threads.
  • API plus database on one box: memory for the database cache becomes the limit; S5 with 128 GB DDR4 keeps a sizable working set in RAM.
  • Heavy internal traffic between many services: a dual CPU machine such as D4 keeps everything on one fast local network stack.

Where should the API server be?

Near its callers and near its database. For a mobile app with users mostly in North America, an East Coast location like Ashburn keeps round trips short for most of them; for Southeast Asia, Singapore. Above all, keep the API and its database in the same city, ideally on the same machine or neighbors, because each query crosses that link. Latency explains the effect of distance on every request.

What protects an API server?

Put a reverse proxy in front for TLS and rate limiting, require authentication on every non-public endpoint, validate input strictly, return generic error messages to clients while logging the detail internally, and keep secrets out of code. Our edge DDoS filtering takes care of volumetric floods; application-level abuse, such as credential stuffing against a login endpoint, needs rate limits and tools like Set up fail2ban. An Gateway server can centralize keys and limits once you have several APIs.

Machines for API Back Ends

ServerProcessorCores / threadsMemoryStorageNetworkPer monthSmallest order
S1Intel Xeon E-2276G6 / 1264 GB DDR41x 1 TB NVMe2x 10 Gbps$53.32$53.32 (1 month)
S5Intel Xeon E-2276G6 / 12128 GB DDR42x 1 TB NVMe2x 10 Gbps$88.72$88.72 (1 month)
S11Intel Core i9-14900K24 / 32128 GB DDR52x 2 TB NVMe2x 10 Gbps$149.39$149.39 (1 month)
S14AMD EPYC 4565P16 / 32192 GB DDR52x 4 TB NVMe2x 25 Gbps$317.89$317.89 (1 month)
D42x Intel Xeon Gold 632632 / 64128 GB DDR42x 1 TB NVMe2x 25 Gbps$275.41$275.41 (1 month)

Keep Reading

Web server

Both meanings of web server, the software that speaks HTTP and the machine that runs it, plus what limits how many visitors one box serves.

Open

Gateway server

A server that joins two networks or protocols and controls what passes between them, from NAT gateways to API and payment gateways.

Open

Latency

Why distance sets the floor for ping time, how to estimate round trips between our six cities and how to choose a location.

Open

SaaS hosting

Host a multi-tenant web app on bare metal: app, workers and database split by box as customers grow.

Open

FAQ

Quick Answers

A web server mostly delivers pages and files for browsers. An API server returns structured data, such as JSON, for other programs.

gRPC is usually faster and smaller on the wire, which suits service to service traffic. REST with JSON is simpler for public clients.

From a few hundred to tens of thousands, depending on the work per request. Load test from a second machine to find your number.

No. Machines are ordered and managed in the panel. You can run any API software you like on your own machine.

For small and mid-size apps, yes, it removes network delay. Split them when either needs more resources than one box gives.