# Patchworks infrastructure

## Introduction

A cutting-edge iPaaS platform requires a robust, versatile infrastructure that scales with its customers. The Patchworks infrastructure is built on Kubernetes, a technology that has revolutionised how we deploy, manage, and scale our applications:

<figure><img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2F6TilsfdrvQDQVU0QsRev%2FPatchworks%20infrastructure%20overview.png?alt=media&#x26;token=e3e805c0-6d6b-4c69-ad65-d46de0c89beb" alt=""><figcaption></figcaption></figure>

## MACH

<table data-card-size="large" data-view="cards"><thead><tr><th></th><th></th><th></th><th data-hidden data-card-cover data-type="files"></th></tr></thead><tbody><tr><td><strong>Microservices</strong> are used to build the Patchworks platform  - small, independent services that communicate with each other, allowing for flexibility, scalability, and easier maintenance.</td><td></td><td></td><td><a href="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2Fw1B9VWWbwdOlLmxElj0d%2Fmicroservices.png?alt=media&#x26;token=85f9097a-a1ee-4bad-bd8a-52e297e0db9c">microservices.png</a></td></tr><tr><td><strong>API first</strong> is key for powerful integrations.  Our next-generation dashboard is driven by powerful APIs which means we can integrate with any other API simply and seamlessly.</td><td></td><td></td><td><a href="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FvhbUqCkI3wWrhiQgJ1m9%2Fbanner5%20api.png?alt=media&#x26;token=f87eb8c5-6bf0-4c31-93ef-7a07b5c3998f">banner5 api.png</a></td></tr><tr><td><strong>Cloud-native</strong> development facilitates our microservice architecture, Kubernetes deployments, DevOps infrastructure as code, and much more!</td><td></td><td></td><td><a href="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FEvYLPAEKYyQZ9sqbaobK%2Fbanner%20cloud.png?alt=media&#x26;token=1f5e43f5-c28b-4ad5-97a7-67512a62fcf9">banner cloud.png</a></td></tr><tr><td><strong>Headless</strong> is exactly what you'd expect for an API-first platform. The Patchworks backend is built with our own API, which is then consumed by the dashboard for general use.</td><td></td><td></td><td><a href="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FG6yV8ituMopNDgVTHr0I%2Fheadless.png?alt=media&#x26;token=5b432d55-4572-408c-925d-e481a57c0acd">headless.png</a></td></tr></tbody></table>

## Performance & scalability

<table data-card-size="large" data-view="cards"><thead><tr><th></th><th></th><th></th><th data-hidden data-card-cover data-type="files"></th></tr></thead><tbody><tr><td><strong>Kubernetes pod and node auto-scaling</strong> Ensure that integrations run consistently, even in the busiest times. See our <a href="patchworks-infrastructure/auto-scaling">auto-scaling</a> page for more information.</td><td></td><td></td><td><a href="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FKAgP0rLEr5ps2OdUMnzQ%2Fbanner1%20k8s%202.png?alt=media&#x26;token=01802350-998e-45dc-a958-8d65ad22425c">banner1 k8s 2.png</a></td></tr><tr><td><p>We use <strong>AWS RDS</strong> for all critical databases. Our databases have full redundancy with one ‘read’ and one ‘write’ copy of each. </p><p></p></td><td></td><td></td><td><a href="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FEmyaOkasz79fzvxC39tg%2Fbanner2%20rds%202.png?alt=media&#x26;token=8ee2a80e-319e-489c-b6d1-3351e702d6b4">banner2 rds 2.png</a></td></tr><tr><td>Each database copy is hosted in a <strong>separate availability zone</strong> so, in the unlikely event of a failure in one zone, we can fall back to the other.</td><td></td><td></td><td><a href="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FhDkiqGRXmEaWRWarFoOy%2Fbanner%203%20ha.png?alt=media&#x26;token=8aa0175b-e17b-4b4b-8bf6-e84fb4c95ee6">banner 3 ha.png</a></td></tr></tbody></table>

## Issue identification & resolution

<table data-card-size="large" data-view="cards"><thead><tr><th></th><th></th><th></th><th data-hidden data-card-cover data-type="files"></th></tr></thead><tbody><tr><td><strong>Real-time logs</strong> (via web sockets) can be viewed while a process flow runs, with visibility of request, response and payload information at every step. </td><td></td><td></td><td><a href="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2F0BgvKp3MKxM4dpJ1tqsJ%2Fbanner4%20logs.png?alt=media&#x26;token=ac6206d1-4a43-4540-859f-6dabf4b2f9de">banner4 logs.png</a></td></tr><tr><td>Logs are <strong>retained for one month</strong> for retrospective problem-solving.</td><td></td><td></td><td><a href="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FdnnkT9E4H2RroH4qJfi1%2Fbanner%20retention.png?alt=media&#x26;token=5af68a22-7de8-4386-907f-16ff46728716">banner retention.png</a></td></tr><tr><td><strong>Webhooks</strong>, <strong>events</strong>, and <strong>inbound API</strong> requests can all be tracked through the Patchworks Dashboard - you don’t need to be an engineer to figure out when/where execution errors occur.</td><td></td><td></td><td><a href="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FoIqxDcF22mhQcxU29W44%2Fbanner%20monitor.png?alt=media&#x26;token=21dd6e68-5d96-4aa8-a186-a25873c5b7d6">banner monitor.png</a></td></tr></tbody></table>

## Removal of complexity&#x20;

<table data-card-size="large" data-view="cards"><thead><tr><th></th><th></th><th></th><th data-hidden data-card-cover data-type="files"></th></tr></thead><tbody><tr><td>We manage all <strong>API updates</strong> for our library of prebuilt connectors.</td><td></td><td></td><td><a href="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FvhbUqCkI3wWrhiQgJ1m9%2Fbanner5%20api.png?alt=media&#x26;token=f87eb8c5-6bf0-4c31-93ef-7a07b5c3998f">banner5 api.png</a></td></tr><tr><td>We take care of all supported <strong>authentication mechanisms</strong> (OAuth, token, API key, etc.).</td><td></td><td></td><td><a href="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2Fyc1Lbwg1wv0S7xpRT4cq%2Fbanner6%20auth.png?alt=media&#x26;token=a2870c69-5b6f-4c46-9601-bb156050b7a9">banner6 auth.png</a></td></tr><tr><td>We've removed all the complexity when it comes to <strong>building and maintaining new integrations</strong>.</td><td></td><td></td><td><a href="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2F98n914HH5Q70qRdWdt58%2Fbanner%20build.png?alt=media&#x26;token=560aa60f-811f-45a4-9244-9359222a7f39">banner build.png</a></td></tr></tbody></table>

## Multi-tenancy

<table data-card-size="large" data-view="cards"><thead><tr><th></th><th></th><th></th><th data-hidden data-card-cover data-type="files"></th></tr></thead><tbody><tr><td>Our <strong>multi-tenant architecture</strong> means that customers have the benefits of shared software and infrastructure, secure in the knowledge that each customer's data is isolated and invisible to other tenants.</td><td></td><td></td><td><a href="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FA3WTfDwNz1wAnOt4sswF%2Fmulti-tenancy-shared%202.png?alt=media&#x26;token=155cb6d7-3201-4283-9772-1e97c37d9de0">multi-tenancy-shared 2.png</a></td></tr><tr><td>Multi-tenancy provides a much <strong>faster solution</strong>, since we only search one set of data rather than everything - all database operations and secret storage is per-tenant.</td><td></td><td></td><td><a href="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FvJfRIkJZIvl2eSabGDSh%2Fmulti-tenancy-search%202.png?alt=media&#x26;token=6a14d31a-b45f-4b23-9780-2491177336a0">multi-tenancy-search 2.png</a></td></tr><tr><td>Multi-tenancy allows <strong>flexibility for change</strong> - if necessary we can 'lift and shift' a tenant to a new database, or to a faster region, or even to a completely different cloud provider in a different continent!</td><td></td><td></td><td><a href="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FIj95W1hVFzjqBk3XhuKh%2Fmulti-tenancy-change%202.png?alt=media&#x26;token=e9180209-f794-4278-97ea-ce4bc24d937d">multi-tenancy-change 2.png</a></td></tr><tr><td></td><td></td><td></td><td></td></tr></tbody></table>

## Robust processes for assured uptime

<table data-card-size="large" data-view="cards"><thead><tr><th></th><th></th><th></th><th data-hidden data-card-cover data-type="files"></th></tr></thead><tbody><tr><td>Infrastructure updates are made via <strong>IaC (Infrastructure as Code)</strong>. </td><td></td><td></td><td><a href="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FPC3OQQUNp8a4Oq7zFxzk%2Fbanner7%20iac.png?alt=media&#x26;token=fca050f6-f8a0-49cf-8710-7aa78853c101">banner7 iac.png</a></td></tr><tr><td>Infrastructure updates are <strong>peer-reviewed and authorised</strong> before being merged.</td><td></td><td></td><td><a href="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2F5yFPVdACoihk7ICLNbsj%2Fbanner8%20review.png?alt=media&#x26;token=966b3f77-7da2-48a1-998d-00deb0e72928">banner8 review.png</a></td></tr><tr><td>All production code flows through <strong>development and staging review cycles</strong> before release to production.</td><td></td><td></td><td><a href="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2F5yFPVdACoihk7ICLNbsj%2Fbanner8%20review.png?alt=media&#x26;token=966b3f77-7da2-48a1-998d-00deb0e72928">banner8 review.png</a></td></tr><tr><td>Every release must pass both <strong>automated</strong> and <strong>hands-on testing</strong> by our QA team.</td><td></td><td></td><td><a href="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FCrkncrrtAFPWwHop7SL4%2Fbanner%209%20test.png?alt=media&#x26;token=f0fb81d9-e8ca-4ea7-8c18-191a81a99679">banner 9 test.png</a></td></tr></tbody></table>

## Infrastructure security

<table data-card-size="large" data-view="cards"><thead><tr><th></th><th></th><th></th><th data-hidden data-card-cover data-type="files"></th></tr></thead><tbody><tr><td>Product <strong>penetration testing</strong> is performed annually by an external, CREST-accredited organisation.</td><td></td><td></td><td><a href="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FbW2YGrGuZf6hY1rre3MX%2Fbanner%20secure.png?alt=media&#x26;token=ee958f30-ffde-4c45-9483-7be79cc83fa5">banner secure.png</a></td></tr><tr><td>Our Kubernetes nodes live in <strong>private subnets</strong>.</td><td></td><td></td><td><a href="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2F3YlDj7hmNTdqK2PIB3eZ%2Fbanner%20subnet.png?alt=media&#x26;token=884913d1-95a1-4cfd-997d-272783e0ba7f">banner subnet.png</a></td></tr><tr><td>All key ingresses are <strong>IP whitelisted</strong>.</td><td></td><td></td><td><a href="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FiSJ31YFDR0UxXLyucfFB%2Fbanner%20allow%20list.png?alt=media&#x26;token=4035b4f5-3ea2-4a29-ae44-9c0262e62795">banner allow list.png</a></td></tr><tr><td>We adopt a 'least privilege' model for our development team, and also for users of our AWS and Kubernetes infrastructure. </td><td></td><td></td><td><a href="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FkyUeMl4iq1nuXSVlERAi%2Fleast%20privilege.png?alt=media&#x26;token=a40f223f-f10d-4769-8854-a2a6161e1e56">least privilege.png</a></td></tr><tr><td>All key business systems must be accessed via a VPN</td><td></td><td></td><td><a href="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FRQ68RxzGOuHUO3aCPK91%2Fvpn.png?alt=media&#x26;token=6a43bf42-4fc1-4f39-8221-948d4baaea80">vpn.png</a></td></tr><tr><td>All staff use LastPass to generate and store strong passwords - 2FA access to LastPass is mandated.</td><td></td><td></td><td><a href="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FtMewA8TnTeu78s5iehLB%2Flastpass.png?alt=media&#x26;token=da6882e0-7748-40db-a14c-f56e4d5b3c6b">lastpass.png</a></td></tr></tbody></table>

## Platform account security

<table data-card-size="large" data-view="cards"><thead><tr><th></th><th></th><th></th><th data-hidden data-card-cover data-type="files"></th></tr></thead><tbody><tr><td>Access is managed via <strong>role-based permissions</strong>, so only authorised users can access integrations and data for their company profile(s).</td><td></td><td></td><td><a href="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FpwYJNmGtUailXwQuKFiz%2Fbanner%20role.png?alt=media&#x26;token=d1f25d27-c1b6-458d-8ad0-d708503ff271">banner role.png</a></td></tr><tr><td><strong>Audit logs</strong> provide a complete history of all user account activity, including Patchworks users.</td><td></td><td></td><td><a href="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FqUp2kXKmYjk0Yh1N0Few%2Fbanner%20log.png?alt=media&#x26;token=49d55071-1a44-42cf-b138-a243ad7191a1">banner log.png</a></td></tr><tr><td>Users always <strong>control their own passwords</strong> - password resets are never performed on behalf of other users.</td><td></td><td></td><td><a href="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2F4wSaoIDcdX8iTUCyWGSf%2Fbanner%20password.png?alt=media&#x26;token=8ddc2219-e718-472b-a2c3-7f563149df3e">banner password.png</a></td></tr><tr><td><strong>Single sign-on</strong> via Google is supported.</td><td></td><td></td><td><a href="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2Fek98XIGp9utVXC4H4NHe%2Fbanner%20google.png?alt=media&#x26;token=df45ab34-7f38-4c10-b5c9-dda83b9f379a">banner google.png</a></td></tr></tbody></table>
