# Hosting Recommendations

There are 2 main categories of recommendations for hosting:

* Host Specifications: CPU, RAM, Storage
* Security: Authentication, Restricting exposure to the public internet

## Host Specifications

Recommendations vary depending on your setup

### Single Host Minimum Setup

Single host containing the complete app(web, price adapters, order adapters, market data, smart order router, etc),  Redis server, Rabbitmq, Postgres DB

* At least 8 cores or 8 vCPUs
* At least 32 GB of RAM
* At least 128 GB of storage

This setup is great for trialing and limited use, but we recommend switching to a distributed setup for better, more consistent performance, and easier maintenance. The performance and maintenance of the persistence services will impact the performance of the application in this setup.  The advantage of this setup is that there is minimal latency interacting with the Redis cache and Postgres.

### Single Host Recommended Setup

Single host containing the complete app(web, price adapters, order adapters, market data, smart order router, etc), Redis server, Rabbitmq, Postgres DB

* At least 16 cores or 16 vCPUs
* At least 64 GB of RAM
* At least 256 GB of storage

if needed, guidance for choosing hosts for dedicated Redis, Postgres, and Rabbitmq is available:\
[Redis Hardware Requirements](https://docs.redis.com/latest/rs/installing-upgrading/hardware-requirements/)\
[Postgres Hardware Requirements](https://www.enterprisedb.com/docs/supported-open-source/postgresql/installer/01_requirements_overview/#:~:text=Hardware%20requirements\&text=The%20minimum%20hardware%20required%20to,512%20MB%20of%20HDD)\
[Rabbitmq Hardware Requirements](https://www.rabbitmq.com/docs/production-checklist)

### Distributed Order Adapters Setup

Hosts contain only the order adapter services. The hosts are connected by the managed service. This is the recommended long term set up.

For hosts running the market-access containers

* At least 4 cores or 4 vCPUs
* At least 8 GB of RAM
* At least 64 GB of storage

## Security

* Network: Hosts should live in a private network exposing only port 443 to the public internet
  * **IMPORTANT**: If you're using the simple set up, ensure port 5443 and 6379 are not exposed to the public internet
* SSL termination: At some point on the network call, either on  the instance or some entry point into the private network ex. a load balancer


---

# 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.tread.fi/enterprise/self-hosted-service/hosting-recommendations.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.
