# Server Layout

Learn about the different server layouts that FusionAuth can be installed with to optimize performance and security.

> For the index of this section of the site, see [llms.txt](https://fusionauth.io/docs/llms.txt)

To help you determine the best server layout, look over the diagrams below and determine which layout works best for your dev, staging and production environments.

Each layout will require FusionAuth App, Search Engine and a relational database.

The FusionAuth services are separated because as you will see in the diagrams below they may not all run on the same server, and each component can be horizontally scaled separately. The FusionAuth Search is Elasticsearch and FusionAuth will handle the cluster configuration when multiple instances are installed based upon the provided configuration. See the [Configuration](https://fusionauth.io/docs/deploy/production/configuration.md) reference for additional detail.

After you have selected a desired server layout, see the installation links below for each service.

*   [Install a Database](https://fusionauth.io/docs/deploy/production/install/database.md)
*   [Install FusionAuth Search](https://fusionauth.io/docs/deploy/production/install/search.md)
*   [Install FusionAuth App](https://fusionauth.io/docs/deploy/production/install/fusionauth-app.md)

## Single server

![One server](https://fusionauth.io/img/docs/get-started/download-and-install/single-server.png)

This configuration uses a single server to host all of the components for FusionAuth including the relational database. In this deployment model there is no service redundancy and there is a risk of resource contention. For this reason this model should be limited to the following purposes:

*   Development servers or workstations
*   QA / Staging environments
*   Small production deployments

## Two servers with external database

![Two servers with an external database](https://fusionauth.io/img/docs/get-started/download-and-install/two-servers-external-db.png)

This configuration uses a separate server to host the relational database. The method for configuring this database is outside the scope of this guide but a general guideline would be to provide some sort of storage redundancy or clustering capability to ensure a high level of availability and performance.

Each FusionAuth service is redundant and running on a separate server, this configuration provides basic redundancy.

When more than one FusionAuth Search is running and configured properly these Elasticsearch nodes will cluster and duplicate each the entire search index by replicating shards between nodes.

In this scenario FusionAuth should be placed behind a load balancer to utilize both services equally. Prior to version `1.19.0` session pinning should be utilized to support stateful sessions to FusionAuth. API connections to the FusionAuth App are stateless and do not require session pinning. All URLs beginning with `/api/` will be API requests and should not be session pinned. In version `1.19.0` this requirement was removed and session pinning is no longer required. This configuration is best suited for the following purposes:

*   Staging environments
*   Production deployments

## Horizontally Scaled with external database

![Horizontally scaled with an external database](https://fusionauth.io/img/docs/get-started/download-and-install/n-servers-external-db.png)

This configuration uses separate servers to host FusionAuth App, FusionAuth Search and the database. This is a theoretical example of scaling each service individually. This configuration will provide the most flexibility and availability to FusionAuth.

The details regarding load balancing requests and session pinning (when applicable) is the same as the previous example. This highly flexible and performance oriented configuration is best suited for the following purposes:

*   Staging environments suitable for load testing
*   Production environments
---

## Other pages in Production

> For the full index of this section, see [Deploy](https://fusionauth.io/docs/llms-deploy.txt).

- [FusionAuth CLI](https://fusionauth.io/docs/deploy/production/cli.md): Learn about the FusionAuth CLI tool.
- [Configure a FusionAuth sCluster](https://fusionauth.io/docs/deploy/production/cluster.md): Learn how to set up a multi-node FusionAuth cluster.
- [Configuration Reference](https://fusionauth.io/docs/deploy/production/configuration.md): Learn about the configuration options for FusionAuth.
- [Air-gapping](https://fusionauth.io/docs/deploy/production/install/air-gapping.md): Run FusionAuth with no network access (air-gapped).
- [Install a Database](https://fusionauth.io/docs/deploy/production/install/database.md): Learn how to install the database that FusionAuth will use to store user data.
- [Customize Docker Images](https://fusionauth.io/docs/deploy/production/install/docker-configuration.md): Learn how to configure a Docker image containing FusionAuth to meet the needs of your application.
- [Install FusionAuth App](https://fusionauth.io/docs/deploy/production/install/fusionauth-app.md): Learn how to install FusionAuth App on a production server with Docker or from a package.
- [Packages](https://fusionauth.io/docs/deploy/production/install/packages.md): Learn how to determine which installation packages you need.
- [Install a Search Engine](https://fusionauth.io/docs/deploy/production/install/search.md): Learn how to install a search engine for your FusionAuth instance.
- [Silent Mode](https://fusionauth.io/docs/deploy/production/install/silent-mode.md): This is a guide to using silent mode during FusionAuth install and updates.
- [Microsoft Azure Kubernetes Service (AKS)](https://fusionauth.io/docs/deploy/production/kubernetes/aks.md): Learn how to provision an AKS cluster in Microsoft Azure.
- [Elastic Kubernetes Service (EKS)](https://fusionauth.io/docs/deploy/production/kubernetes/eks.md): Learn how to provision an EKS cluster in AWS.
- [Deploy with k8s](https://fusionauth.io/docs/deploy/production/kubernetes/fusionauth-deployment.md): Learn how to deploy FusionAuth in a Kubernetes Cluster.
- [Google Kubernetes Engine (GKE)](https://fusionauth.io/docs/deploy/production/kubernetes/gke.md): Learn how to provision a GKE cluster in Google Cloud (GCP).
- [Kubernetes](https://fusionauth.io/docs/deploy/production/kubernetes.md): Learn how to deploy and test FusionAuth using Kubernetes.
- [Local Cluster with minikube](https://fusionauth.io/docs/deploy/production/kubernetes/minikube.md): Learn how to provision minikube for local development and testing of FusionAuth kubernetes deployments.
- [AWS](https://fusionauth.io/docs/deploy/production/marketplaces/aws.md): Learn how to use FusionAuth with the AWS Marketplace.
- [DigitalOcean](https://fusionauth.io/docs/deploy/production/marketplaces/digitalocean.md): Learn how to use FusionAuth with the DigitalOcean Marketplace.
- [Google Cloud](https://fusionauth.io/docs/deploy/production/marketplaces/google-cloud.md): Learn how to use FusionAuth with the GCP Marketplace.
- [Install from a Marketplace](https://fusionauth.io/docs/deploy/production/marketplaces.md): Learn how to install FusionAuth using cloud marketplaces or templates.
- [Render](https://fusionauth.io/docs/deploy/production/marketplaces/render.md): Set FusionAuth up on Render from a Blueprint.
- [Proxy FusionAuth](https://fusionauth.io/docs/deploy/production/proxy-setup.md): Learn more about HTTP proxies and FusionAuth.
- [Start and Stop a Production Instance](https://fusionauth.io/docs/deploy/production/start-and-stop.md): Learn how to start and stop the FusionAuth services on a production server, in Docker, and in Kubernetes.
- [System Requirements](https://fusionauth.io/docs/deploy/production/system-requirements.md): Learn the minimum system requirements required to install and run FusionAuth.
- [Manage FusionAuth With Terraform](https://fusionauth.io/docs/deploy/production/terraform.md): Learn how to create and change FusionAuth configuration with the FusionAuth Terraform provider.
