Rippled Server Modes
The rippled server software can run in several modes depending on its configuration, including:
P2P Mode - This is the main mode of the server: it follows the peer-to-peer network, processes transactions, and maintains some amount of ledger history. This mode can be configured to do any or all of the following roles:
- Validator - Helps secure the network by participating in consensus.
- API Server - Provides API access to read data from the shared ledger, submit transactions, and watch activity in the ledger. Optionally, this can be a Full History Server, which keeps a complete record of transaction and ledger history.
- Hub Server - Relays messages between many other members of the peer-to-peer network.
Stand-alone mode - An offline mode for testing. Does not connect to the peer-to-peer network or use consensus.
You can also run the rippled executable as a client application for accessing rippled APIs locally. (Two instances of the same binary can run side-by-side in this case; one as a server, and the other running briefly as a client and then terminating.)
P2P Mode
P2P Mode is the main and default mode of the rippled server, and it can handle almost anything you might want your server to do. These servers form a peer-to-peer network that processes transactions and maintains the shared state of the XRP Ledger. If you want to submit transactions, read ledger data, or otherwise participate in the network, your requests must go through a P2P Mode server at some point.
P2P Mode servers can be further configured to provide additional functionality. A server running in P2P Mode with a minimally-modified config file is also called a stock server. Other configurations include:
- Validator
- API Server
- Public Hubs
P2P Mode servers connect to Mainnet by default.
API Servers
All P2P Mode servers provide APIs for purposes like submitting transactions, checking balances and settings, and administering the server. If you query the XRP Ledger for data or submit transactions for business use, it can be useful to run your own server.
Full History Servers
Unlike some other blockchains, the XRP Ledger does not require servers to have a complete transaction history to know the current state and process new transactions. As a server operator, you decide how much ledger history to store at a time. However, a P2P Mode server can only answer API requests using the ledger history it has locally available. For example, if you keep six months of history, your server can't describe the outcome of a transaction from a year ago. API servers with full history can report all transactions and balances since the start of the XRP Ledger.