# Architecture Fundamentals

Flopsar consists of three main components:

* Agent
* Server
* Workstation

`Agent` is installed on JVM applications and produces data, `Server` collects and serves data, and `Workstation` provides access to the collected data. The entire Flopsar environment can be installed in one of the two architectures: [standalone](#standalone-architecture) or [distributed](#distributed-architecture).

## Standalone Architecture

In this architecture, both manager and database are bundled and make use of the same working directory. The architecture is easier to manage than the distributed one and is sufficient for most of the installations. If you experience any performance issues with your installation or have any other reason not to use the standalone architecture then consider using a distributed one.

![Standalone Architecture](https://3024459036-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LpN7wUQHQSd7nz09yOW%2F-Lwms1r5TTXeIn0M7wGW%2F-Lwmv8j5IqYyvOgtOBSl%2Fstandalone.svg?alt=media\&token=f7dfde43-ef13-4416-b7fc-782457d620e6)

In order to install Flopsar environment in the standalone architecture, you must install `Server` in the [standalone mode](https://docs.flopsar.com/3.0/server#standalone-mode).

### Networking

There is only a single TCP server exposed by `Server`. Any client connects to this TCP server. This means the following connections must be allowed:

* outgoing connections from agents to the server,
* outgoing connections from workstations to the server.

## Distributed Architecture

In this architecture manager and database operate separately. They can be both installed either on a single machine or separate ones.

![Distributed Architecture](https://3024459036-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LpN7wUQHQSd7nz09yOW%2F-LwyQx5lyW4AkB3EfhAL%2F-Lx0zZduE4IZW5D7Vqm6%2Fdistributed.svg?alt=media\&token=643f8b7c-dd94-4873-969f-125a09309b64)

### Networking

In this architecture, `Manager` and `Database` instances expose their own TCP servers. This means the following connections must be allowed:

* outgoing connections from agents to the `Manager` server,
* outgoing connections from agents to the `Database` servers,
* outgoing connections from workstations to the `Manager` server,
* outgoing connections from workstation to the `Database` servers,
* outgoing connections from databases to the `Manager` server.
