# Deployment models

Deploying the Payment Hub can be On-premises or any of the cloud providers, depending on the client requirements and regulations in the given jurisdiction.

<figure><img src="https://1303323730-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-L_J6oxfkTjM9Go4YNSW%2Fuploads%2FMC3Wn06f1EduaRdLN197%2FScreenshot%202022-11-07%20at%205.24.02%20PM.png?alt=media&#x26;token=92a4e7f0-498a-47e2-ab9e-33505d565bf0" alt=""><figcaption></figcaption></figure>

The Payment Hub is designed in a fashion, where even a single deployment could become a shared service serving multiple DFSPs run by an aggregator (multiple SACCOs, credit unions on a multitenant setup).

Depending on the scale, expected throughput, fault tolerance, high availability requirements we are suggesting three different type of deployments for the Payment Hub.

* barebone - single instance of components, minimised resource usage, no loss of functionality&#x20;
* medium - single realtime engine&#x20;
* fully scaled - multiple realtime engines&#x20;

## Barebone deployment

![Barebone deployment](https://lh5.googleusercontent.com/nNo1VE5BPyr5o5CyNT-OExdrAD7vbzO_FEifnD7y-cRd9L2MGAKbK0jMQppb6flJc0vaPnVGF4Ovc_XX20ZSU8t8BDyQc1abyoB18X8GRwbUeLS8GwdBKEB_PFAJVLhcdbwttRXFEK4)

## Medium deployment

Single kubernetes cluster to contain all the necessary components&#x20;

Fault tolerance provided by the clustered components&#x20;

Stretched installation across data centers possible, but not ideal

![Medium deployment](https://lh4.googleusercontent.com/OG277n1F7I6YQv9pusN62_sRuxSExtjAIAqLtnt8lYDfYHaHI1UaWiU1qqxDLolZ6SCAo_IGuzRzD4tu6fcY_4Dz9c9NoF-CoXzGOukUVHIOZ7CFrLr24S7l9XwIxKZmyCPa3Ec6tbs)

## Full scale - large deployment

Multiple independent payment engines (a single engine is collocated for performance), enabling complete version upgrades without service interruptions&#x20;

Running in different data centers on independent network connections (high availability, fault tolerant even in case of disaster scenarios)&#x20;

Partitioning the load across the engines

![Fully scaled version for large environments](https://lh6.googleusercontent.com/2nCgoDSZSv3QOJbuDfQDPLUA2aYYS8YhJE0iFQNSsel_WWtA0_9O248yT4Afx7t9qX7mRfNO6EPXOgBUutNmOo2yjmi2eyKkoMReF40QcK3r2Lg5gmn7Xw6gIdK_ynnbvD-pn1gug3U)

### **Sandbox Environment**&#x20;

<figure><img src="https://1303323730-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-L_J6oxfkTjM9Go4YNSW%2Fuploads%2FLn6O2KgvO9IuhaRFOPJn%2FScreenshot%202022-11-07%20at%205.53.03%20PM.png?alt=media&#x26;token=2ff3762a-9ea7-4327-b435-80927b1d462b" alt=""><figcaption></figcaption></figure>


---

# 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://mifos.gitbook.io/docs/payment-hub-ee/overview/deployment-models.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.
