[{"data":1,"prerenderedAt":240},["ShallowReactive",2],{"navigation_docs":3,"-getting-started-architecture":99,"-getting-started-architecture-surround":235},[4,30],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":6},"Getting Started",false,"\u002Fgetting-started","1.getting-started",[10,15,20,25],{"title":11,"path":12,"stem":13,"icon":14},"Quickstart","\u002Fgetting-started\u002Fquickstart","1.getting-started\u002F1.quickstart","i-lucide-fast-forward",{"title":16,"path":17,"stem":18,"icon":19},"Core Concepts","\u002Fgetting-started\u002Fcore-concepts","1.getting-started\u002F2.core-concepts","i-lucide-workflow",{"title":21,"path":22,"stem":23,"icon":24},"Configs Anatomy","\u002Fgetting-started\u002Fconfigs","1.getting-started\u002F3.configs","i-lucide-file-cog",{"title":26,"path":27,"stem":28,"icon":29},"Architecture","\u002Fgetting-started\u002Farchitecture","1.getting-started\u002F4.architecture","i-lucide-layers",{"title":31,"defaultOpen":32,"path":33,"stem":34,"children":35,"page":6},"SDKs",true,"\u002Fsdks","2.sdks",[36,41,62,72,88],{"title":37,"path":38,"stem":39,"icon":40},"Available SDKs","\u002Fsdks\u002Favailable-sdks","2.sdks\u002F1.available-sdks","i-lucide-list",{"title":42,"icon":43,"defaultOpen":32,"path":44,"stem":45,"children":46,"page":6},"Browser SDKs","i-lucide-monitor","\u002Fsdks\u002Fbrowser","2.sdks\u002F2.browser",[47,52,57],{"title":48,"path":49,"stem":50,"icon":51},"Javascript","\u002Fsdks\u002Fbrowser\u002Fjavascript","2.sdks\u002F2.browser\u002F1.javascript","cd-logos-javascript",{"title":53,"path":54,"stem":55,"icon":56},"React","\u002Fsdks\u002Fbrowser\u002Freact","2.sdks\u002F2.browser\u002F2.react","cd-logos-react-light",{"title":58,"path":59,"stem":60,"icon":61},"Vue","\u002Fsdks\u002Fbrowser\u002Fvue","2.sdks\u002F2.browser\u002F3.vue","cd-logos-vue",{"title":63,"icon":64,"defaultOpen":32,"path":65,"stem":66,"children":67,"page":6},"Mobile SDKs","i-lucide-smartphone","\u002Fsdks\u002Fmobile","2.sdks\u002F3.mobile",[68],{"title":69,"path":70,"stem":71,"icon":56},"React Native","\u002Fsdks\u002Fmobile\u002Freact-native","2.sdks\u002F3.mobile\u002F1.react-native",{"title":73,"icon":74,"defaultOpen":32,"path":75,"stem":76,"children":77,"page":6},"Meta-framework SDKs","i-lucide-monitor-smartphone","\u002Fsdks\u002Fmeta","2.sdks\u002F4.meta",[78,83],{"title":79,"path":80,"stem":81,"icon":82},"Next.js","\u002Fsdks\u002Fmeta\u002Fnextjs","2.sdks\u002F4.meta\u002F1.nextjs","cd-logos-nextjs",{"title":84,"path":85,"stem":86,"icon":87},"Nuxt","\u002Fsdks\u002Fmeta\u002Fnuxt","2.sdks\u002F4.meta\u002F2.nuxt","cd-logos-nuxt",{"title":89,"icon":90,"defaultOpen":32,"path":91,"stem":92,"children":93,"page":6},"Server SDKs","i-lucide-server","\u002Fsdks\u002Fserver","2.sdks\u002F5.server",[94],{"title":95,"path":96,"stem":97,"icon":98},"Node.js","\u002Fsdks\u002Fserver\u002Fnode-js","2.sdks\u002F5.server\u002F1.node-js","cd-logos-nodejs",{"id":100,"title":26,"body":101,"description":228,"extension":229,"links":230,"meta":231,"navigation":232,"path":27,"seo":233,"stem":28,"__hash__":234},"docs\u002F1.getting-started\u002F4.architecture.md",{"type":102,"value":103,"toc":219},"minimark",[104,109,113,125,131,140,145,148,156,172,175,183,187,190,196,213],[105,106,108],"h2",{"id":107},"configdirector-architecture","ConfigDirector Architecture",[110,111,112],"p",{},"This section explains the high level architecture on how ConfigDirector evaluates config values and how it delivers updates to client and server SDKs.",[110,114,115,116,120,121,124],{},"For both, client and server SDKs, there are two connection mode options: ",[117,118,119],"em",{},"streaming"," and ",[117,122,123],{},"polling",".",[110,126,127,128,130],{},"The ",[117,129,119],{}," connection is the default behavior. In this connection mode, the client or server SDK opens a persistent HTTP connection to the ConfigDirector services. Upon connecting, it receives an initial payload with all the config values. From that point on, the server pushes any updates via Server Sent Events (SSE) whenever configs are updated. If the connection is dropped, the SDKs will automatically attempt to reconnect after 2 seconds, and apply an exponential backoff if failures continue.",[110,132,133,134,136,137,139],{},"In the case of the ",[117,135,123],{}," connection mode. The SDKs retrieve all the config values with an initial request. From that point on, they periodically poll the ConfigDirector services for additional updates. The polling interval is configurable, but the SDKs enforce a minimum and maximum range. The use of ",[117,138,123],{}," is discouraged and should only be used in circumstances where a persistent streaming connection does not work within your system's constraints.",[141,142,144],"h3",{"id":143},"architecture-of-client-sdks","Architecture of client SDKs",[110,146,147],{},"Your client or mobile application makes use of one of ConfigDirector's client SDKs to communicate with ConfigDirector's services that evaluate configs.",[110,149,150,151],{},"The high level view is as follows:\n",[152,153],"img",{"alt":154,"src":155},"Client SDK architecture","\u002Fimg\u002Farchitecture-client-sdk.webp",[157,158,159,163,166,169],"ol",{},[160,161,162],"li",{},"The ConfigDirector client SDK opens a connection to the ConfigDirector SDK service. It provides the user context, if one was given.",[160,164,165],{},"The ConfigDirector SDK service evaluates all of the configs' targeting rules using the user context provided, and returns the configs with their evaluated values",[160,167,168],{},"The client SDK stores the payload it received from the SDK service and returns the appropriate values whenever a config value is requested by the application",[160,170,171],{},"The client SDK and SDK service keep the connection open. Whenever configs are updated (via the dashboard or admin API) the SDK service pushes events to the client SDK with the updated config values.",[110,173,174],{},"If the application updates the user context via the client SDK, the process restarts from step (1) above. A new connection is initiated with the updated user context.",[176,177,178,179,182],"note",{},"In the event that a config value is requested from the client SDK ",[117,180,181],{},"before"," it receives the initial payload from the SDK service, the client SDK will return the default value provided in code. Once it receives an initial payload, from that point on it will return the values it has cached in memory until new updates are received from the SDK service.",[141,184,186],{"id":185},"architecture-of-server-sdks","Architecture of server SDKs",[110,188,189],{},"Your server application makes use of on of ConfigDirector's server SDKs to communicate with ConfigDirector's services. In the case of server SDKs, evaluation is done by the SDK rather than the remote service.",[110,191,150,192],{},[152,193],{"alt":194,"src":195},"Server SDK architecture","\u002Fimg\u002Farchitecture-server-sdk.webp",[157,197,198,201,204,207,210],{},[160,199,200],{},"The ConfigDirector server SDK opens a connection to the ConfigDirector SDK service",[160,202,203],{},"The SDK service returns all the configs and their targeting rules, without evaluating them",[160,205,206],{},"The server SDK stores the payload in memory",[160,208,209],{},"When your application requests a config to be evaluated for a given user context, the server SDK uses the in memory config definitions and targeting rules to evaluate the given config value",[160,211,212],{},"The server SDK and the SDK service keep the connection open. Whenever configs are updated (via the dashboard or admin API) the SDK service pushes events with the updated configs and targeting rules.",[176,214,215,216,218],{},"In the event that a config value is requested from the server SDK ",[117,217,181],{}," it receives the initial payload from the SDK service, the server SDK will return the default value provided in code. Once it receives an initial payload, from that point on it will evaluate configs with the definitions and targeting rules it has cached in memory until new updates are received from the SDK service.",{"title":220,"searchDepth":221,"depth":221,"links":222},"",2,[223],{"id":107,"depth":221,"text":108,"children":224},[225,227],{"id":143,"depth":226,"text":144},3,{"id":185,"depth":226,"text":186},"How ConfigDirector delivers config values and updates","md",null,{},{"icon":29},{"title":26,"description":228},"V9tlhqywUcjuRZq_RgKT9yiPnc6wgMFFR6GO7D1XZXQ",[236,238],{"title":21,"path":22,"stem":23,"description":237,"icon":24,"children":-1},"Detailed description of configs and their attributes and properties",{"title":37,"path":38,"stem":39,"description":239,"icon":40,"children":-1},"All of ConfigDirector's SDKs",1781641012156]