text: (window.webpackJsonp=window.webpackJsonp||[]).push([[369],{435:function(e,t,r){"use strict";r.r(t),r.d(t,"frontMatter",(function(){return o})),r.d(t,"metadata",(function(){return s})),r.d(t,"toc",(function(){return l})),r.d(t,"default",(function(){return u}));var n=r(3),i=r(8),a=(r(0),r(550)),o={id:"high-availability-ha",title:"High Availability"},s={unversionedId:"guides/high-availability-ha",id:"version-v0.6/guides/high-availability-ha",isDocsHomePage:!1,title:"High Availability",description:"This document explains how to set up Ory Kratos in for High Availability.",source:"@site/versioned_docs/version-v0.6/guides/high-availability-ha.md",sourceDirName:"guides",slug:"/guides/high-availability-ha",permalink:"/kratos/docs/guides/high-availability-ha",editUrl:"https://github.com/ory/kratos/edit/master/docs/versioned_docs/version-v0.6/guides/high-availability-ha.md",version:"v0.6",lastUpdatedBy:"aeneasr",lastUpdatedAt:1619690398,formattedLastUpdatedAt:"4/29/2021",frontMatter:{id:"high-availability-ha",title:"High Availability"},sidebar:"version-v0.6/docs",previous:{title:"Secret and Key Rotation",permalink:"/kratos/docs/guides/secret-key-rotation"},next:{title:"Docker Images",permalink:"/kratos/docs/guides/docker"}},l=[],c={toc:l};function u(e){var t=e.components,r=Object(i.a)(e,["components"]);return Object(a.b)("wrapper",Object(n.a)({},c,r,{components:t,mdxType:"MDXLayout"}),Object(a.b)("p",null,"This document explains how to set up Ory Kratos in for High Availability."),Object(a.b)("h1",{id:"horizontal-scaling"},"Horizontal Scaling"),Object(a.b)("p",null,"Ory Kratos scales effortlessly to thousands of pods without any additional work!"),Object(a.b)("h1",{id:"mail-courier"},"Mail courier"),Object(a.b)("p",null,"Ory Kratos processes emails by storing them in an email queue on your database\nand running a mail courier worker to handle this queue. To avoid processing the\nsame email multiple times, only one instance of this mail courier should be run\nat one time. For simple single-instance Kratos deployments, the courier can\nsimply be run as a background worker, but for multi-instance Kratos deployments,\nit needs to be run a distinct singleton foreground worker. For setup details,\nrefer to the ",Object(a.b)("a",{parentName:"p",href:"/kratos/docs/concepts/email-sms"},"Out of Band Communication guide"),"."),Object(a.b)("p",null,"Ory Kratos does not have any special requirements when it comes to High\nAvailability as it does not manage state itself but instead relies on the SQL\ndatabase for that."),Object(a.b)("p",null,"It is therefore possible to use Ory Kratos with Auto-Scaling Groups (e.g. in\nKubernetes) without any additional configuration."))}u.isMDXComponent=!0},550:function(e,t,r){"use strict";r.d(t,"a",(function(){return d})),r.d(t,"b",(function(){return y}));var n=r(0),i=r.n(n);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function l(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var c=i.a.createContext({}),u=function(e){var t=i.a.useContext(c),r=t;return e&&(r="function"==typeof e?e(t):s(s({},t),e)),r},d=function(e){var t=u(e.components);return i.a.createElement(c.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return i.a.createElement(i.a.Fragment,{},t)}},b=i.a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,a=e.originalType,o=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),d=u(r),b=n,y=d["".concat(o,".").concat(b)]||d[b]||p[b]||a;return r?i.a.createElement(y,s(s({ref:t},c),{},{components:r})):i.a.createElement(y,s({ref:t},c))}));function y(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var a=r.length,o=new Array(a);o[0]=b;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s.mdxType="string"==typeof e?e:n,o[1]=s;for(var c=2;c<a;c++)o[c]=r[c];return i.a.createElement.apply(null,o)}return i.a.createElement.apply(null,r)}b.displayName="MDXCreateElement"}}]);