# Distributed System

A distributed system is a collection of independent computers or processes that appear to users as a single coherent system. Components communicate over a network by passing messages, and they coordinate to achieve a common goal. Examples include distributed databases, content delivery networks, and microservices architectures.

Distributed systems introduce challenges not present in single-machine systems, including network partitions, variable latency, partial failures, and the need for consensus protocols. The CAP theorem states that a distributed system can provide at most two of three guarantees: consistency, availability, and partition tolerance.

API gateways and serverless platforms are inherently distributed systems. An edge-deployed API gateway runs across many geographic locations, routing and processing requests at the node closest to the user. This distribution improves latency and availability but requires careful handling of configuration propagation, state management, and eventual consistency across nodes.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.serverlessapigateway.com/glossary/d/distributed-system.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
