<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Alex George on Medium]]></title>
        <description><![CDATA[Stories by Alex George on Medium]]></description>
        <link>https://medium.com/@alexgeorge_18841?source=rss-843f4582c6d8------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*X-SbRCGUIuNZ3jFwiEpcXw.jpeg</url>
            <title>Stories by Alex George on Medium</title>
            <link>https://medium.com/@alexgeorge_18841?source=rss-843f4582c6d8------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 05:38:28 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@alexgeorge_18841/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Unveiling the Next Generation of AI-Powered Workflow Automation]]></title>
            <link>https://medium.com/@alexgeorge_18841/unveiling-the-next-generation-of-ai-powered-workflow-automation-a1d2809d6d2b?source=rss-843f4582c6d8------2</link>
            <guid isPermaLink="false">https://medium.com/p/a1d2809d6d2b</guid>
            <dc:creator><![CDATA[Alex George]]></dc:creator>
            <pubDate>Wed, 30 Apr 2025 20:37:16 GMT</pubDate>
            <atom:updated>2025-04-30T20:37:16.393Z</atom:updated>
            <content:encoded><![CDATA[<h4>Mockingbird AI Systems Coordinator from Zeusfyi</h4><p>In today’s fast-evolving digital landscape, businesses require robust and intelligent automation solutions that can adapt to complex workflows and data streams. Our latest offering redefines the boundaries of AI-driven automation, seamlessly blending AI actions with the reliability of Temporal workflows and the discerning power of auto-evals. This innovative approach is designed to enhance decision-making, streamline operations, and provide unparalleled control over AI-generated API calls.</p><h3>Multi-Model I/O: Analysis-Aggregation Stages</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0zq-awRGoN9LyqISjlXk_g.png" /><figcaption>Set response format type, chunking and model options</figcaption></figure><p>In the realm of AI-driven automation, the ability to handle multiple models and data types is crucial. Our platform excels with its analysis-aggregation stages, which are designed to process multi-model inputs and outputs. This functionality enables the system to analyze data through various AI models — each suited for different types of data or analysis needs. The results are then aggregated, providing a comprehensive output that integrates insights from across models. This multi-model approach ensures that the analysis is robust, nuanced, and capable of capturing a wide array of data intricacies.</p><h3>Intelligent Prompt Chunking with ‘Deduce’</h3><p>When it comes to AI prompts, context is king. Our ‘Deduce’ feature is a game-changer, intelligently breaking down prompt requests to fit within the AI’s context window. This ensures optimal performance and relevancy in responses, providing a seamless interaction with AI, even with the most complex prompts.</p><h3>AI Actions Enhanced by Temporal Reliability</h3><p>Utilizing Temporal, we bring a fault-tolerant, scalable backbone to AI actions, ensuring that every task is tracked, retried, and executed to completion without the risk of failure. This means that even the most intricate AI-driven processes can be conducted with confidence, providing a dependable framework for your applications to operate within.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/890/1*oPyVkRdYIVizqwtBnZm-DQ.png" /><figcaption>Set API route paths and Temporal Durable Execution Retry Settings</figcaption></figure><h3>Auto-Evals: Intelligence Meets Automation</h3><p>Our system transcends traditional automation with the introduction of auto-evals. This feature evaluates AI outputs against predefined criteria, automatically steering the workflow towards the most appropriate course of action. It’s not just automation; it’s automation with an understanding of your business logic and goals.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dfoHZhK9_QM4jB09uxRwMA.png" /><figcaption>Build EvalFns -&gt; Connect Triggers to Evals</figcaption></figure><h3>Built-In JSON Staging: Seamless Data Structuring</h3><p>To further streamline the process, we’ve integrated built-in JSON staging into our workflow design process. This feature automatically structures the data in JSON format at each stage of the process, ensuring that the information is meticulously organized and ready for the next step — be it further analysis, aggregation, or triggering an API call. This built-in structuring saves time and eliminates the common errors that can occur with manual data handling, ensuring a smooth transition from one stage to the next.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/680/1*1VD65OHkp7I7TnPhbmr_Hw.png" /><figcaption>JSON Schema Builder</figcaption></figure><h3>Approval Triggers: You’re in Command</h3><p>Empowerment is key in any automated system. Our triggers put you at the helm, allowing you to approve or reject AI suggestions before they translate into actions. This level of oversight guarantees that automated decisions align with your strategic vision, marrying the efficiency of AI with the nuanced understanding of a human operator.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LcJmvcJxobU-z1ZZnkypQQ.png" /><figcaption>Set trigger API calls on eval function passing outputs by state</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4G2QpERuJz0Ree0POwwiVg.png" /><figcaption>Actions to appove, reject, review</figcaption></figure><h3>Getting Started<a href="http://localhost:3000/docs/mockingbird/builder/json_schemas#getting-started">​</a></h3><h3>Step 1: Defining a JSON Schema<a href="http://localhost:3000/docs/mockingbird/builder/json_schemas#step-1-defining-a-json-schema">​</a></h3><p>Access the Schema Builder: Navigate to the Schema section of the tool. Create a New Schema: Enter a schema name, description, and select the response type (single object or array of objects). Add Fields: Specify field names and data types, and provide descriptions for each.</p><h3>Step 2: Connecting to AI Tasks<a href="http://localhost:3000/docs/mockingbird/builder/json_schemas#step-2-connecting-to-ai-tasks">​</a></h3><p>Select AI Task: Choose the AI task you want to connect with your schema. Attach Schema: Link the AI task with the appropriate schema to ensure structured output.</p><h3>Step 3: Setting up Automated Evaluations<a href="http://localhost:3000/docs/mockingbird/builder/json_schemas#step-3-setting-up-automated-evaluations">​</a></h3><p>Define Evaluation Criteria: Establish rules and conditions for the automated evaluation of AI outputs. Attach Evaluations: Link these evaluations to the AI tasks to be automatically triggered upon task completion.</p><h3>Step 4: Integrating with Temporal Workflows<a href="http://localhost:3000/docs/mockingbird/builder/json_schemas#step-4-integrating-with-temporal-workflows">​</a></h3><p>Use the API approval trigger, and connect your API, which will be sent the payload from the triggered output if approved. These all run within a Temporal workflow, that feature durable execution, so you can chain them together with other tasks, and run them on a schedule, or manually.</p><h3>Step 5: Implementing Human Approval Processes<a href="http://localhost:3000/docs/mockingbird/builder/json_schemas#step-5-implementing-human-approval-processes">​</a></h3><p>Define Approval Conditions: Determine the conditions under which human intervention is necessary. Set up Notifications: Configure notifications to alert the appropriate personnel for approvals. Approval Workflow: Integrate the approval process within the workflow before any external API calls.</p><h3>Creating a Workflow<a href="http://localhost:3000/docs/mockingbird/builder/intro#creating-a-workflow">​</a></h3><p>Define Workflow Name and Group: Start by giving your workflow a distinctive name and group for organizational purposes.</p><h4>Add Stages<a href="http://localhost:3000/docs/mockingbird/builder/intro#add-stages">​</a></h4><p>Sequentially add retrieval, analysis, aggregation, and eval stages, specifying each stage’s parameters and settings.</p><h4>Connect Stages<a href="http://localhost:3000/docs/mockingbird/builder/intro#connect-stages">​</a></h4><p>Link retrieval stages to analysis, ensuring data flows correctly through the workflow.</p><h4>Set Time Periods<a href="http://localhost:3000/docs/mockingbird/builder/intro#set-time-periods">​</a></h4><p>Adjust the fundamental time period to control the overall pacing of the workflow execution.</p><h4>Save Workflow<a href="http://localhost:3000/docs/mockingbird/builder/intro#save-workflow">​</a></h4><p>Once all stages are correctly configured, save the workflow to activate it within the system.</p><h4>Run Workflow</h4><p>Press Start to schedule a workflow that will run the analysis on the time intervals you’ve defined. It will process the data that gets generated from your search query, and then aggregate the results into over a rolling window.<a href="http://localhost:3000/docs/mockingbird/builder/intro#save-workflow">​</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cTSL1mgocywRd68ZlxTvTQ.png" /></figure><h3>Example Run: Eval Results<a href="http://localhost:3000/docs/mockingbird/runs/reports#example-run-eval-results">​</a></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nMdXvtHdYxVMM1fXe4UD8A.png" /><figcaption>Example Run: Eval Results</figcaption></figure><h3>Example Run: Analysis-&gt;Aggregation Flows</h3><p>This shows an analysis stage feeding the aggregation stage. Notice how the Completion Choices output from the analysis stage are then used in the aggregation stage as the prompt body, which is how the aggregation stages work. By default it will use the last analysis stage in the workflow, relative to the aggregation stage, and for multiple analysis stages it will aggregate once every analysis stage has completed at least once and then aggregate all the results from the analysis stages that are within the time window since last aggregation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KL-i-OwwEgA7DhQqQvaS-Q.png" /><figcaption>Example Run: Analysis-&gt;Aggregation Flows</figcaption></figure><h3>Example Usage​</h3><p>Consider a scenario where you are monitoring social media engagement. You would set up retrieval stages to pull data from social media APIs, analyze the sentiment and relevance using an AI model, aggregate the analysis results to track engagement trends over time, and evaluate these trends to decide on marketing strategies.</p><h3>Standing Apart from the Rest</h3><p>While alternatives like Langchain and Auto-GPT offer their own take on AI integration, they fall short in delivering a cohesive, end-to-end automated workflow solution. They do not provide the same level of reliability, control, or intelligent decision-making our platform offers. With us, you get a comprehensive suite of tools that not only automate but also understand and adapt to your business needs in a way no other platform does.</p><h3>What’s Next?</h3><p>In conclusion, our platform isn’t just about doing what others do; it’s about pushing the envelope, delivering a smarter, more intuitive, and more powerful solution for AI-driven automation. Stay tuned as we continue to explore new frontiers in AI and workflow automation, ensuring that your business is always ahead of the curve.</p><p>Ready to transform your workflow automation with the cutting-edge capabilities of our platform? Embrace the future of intelligent automation today and take the first step towards smarter, more efficient operations.</p><p>Discover the full potential of Triggers, Evals, JSON Schema Builder, and API Chaining, all integrated seamlessly into a robust system designed to put you in control.</p><p>Explore our platform and see firsthand how our innovative solutions can empower your business. Your journey towards advanced AI-driven automation starts here. Mockingbird is free to use while in Beta testing for the next few weeks.</p><p>Documentation: <a href="https://docs.zeus.fyi/">docs.zeus.fyi</a><br>Platform: <a href="https://cloud.zeus.fyi/">cloud.zeus.fyi</a><br>LinkTree: <a href="https://linktr.ee/zeusfyi">linktr.ee/zeusfyi</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a1d2809d6d2b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How We Setup Sui Nodes on GKE, EKS, and DigitalOcean]]></title>
            <link>https://medium.com/@alexgeorge_18841/how-we-setup-sui-nodes-on-gke-eks-and-digitalocean-0b7bcf9de81a?source=rss-843f4582c6d8------2</link>
            <guid isPermaLink="false">https://medium.com/p/0b7bcf9de81a</guid>
            <dc:creator><![CDATA[Alex George]]></dc:creator>
            <pubDate>Sun, 16 Feb 2025 21:58:07 GMT</pubDate>
            <atom:updated>2025-02-16T21:58:07.253Z</atom:updated>
            <content:encoded><![CDATA[<h4>On Kubernetes with local NVMe storage using zK8s Part 1</h4><h4>Background</h4><p>Sui is a high performance blockchain that uses an objects data model as opposed to the more common EVM one. This naturally follows from their choice in using Move as their smart contract language of choice. The reason being? It allows Sui validators to both execute and commit transactions using the objects in parallel. The result? One of the fastest, and fastest growing, L1 blockchains and raising the bar for performance in the industry.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bQxATuEWOxr84w5yEQ4IIg.png" /><figcaption>Reference <a href="https://suiexplorer.com/">https://suiexplorer.com</a></figcaption></figure><h4>Purpose</h4><p>We’ll be covering our design process for building Enterprise Grade Sui Nodes on Kubernetes, using local NVMe disks on AWS, GCP, and DigitalOcean via the Zeusfyi universal Kubernetes platform which connects them all. <strong>There will be additional articles per each cloud provider we’ll publish separately for brevity.</strong></p><h4>Sui Full Node — Architecture Reference*</h4><p>The minimal version of a Sui Full node executes all of the transactions Sui validators commit. Sui Full nodes also orchestrate the submitting of new transactions to the system</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/706/1*OqFaGQonWbCrGUlatMVL2Q.png" /><figcaption>Reference: <a href="https://docs.sui.io/guides/operator/data-management#basic-sui-full-node-functionality">https://docs.sui.io/guides/operator/data-management#basic-sui-full-node-functionality</a></figcaption></figure><p>The preceding image shows how data flows through a Full node:</p><p>State sync protocol: A Sui Full node performs the following to achieve state synchronization:</p><ul><li>Retrieves the information about the committed checkpoints via the p2p gossip-like protocol</li><li>Executes the transactions locally to verify that effects match the effects certified by the quorum of the validators</li><li>Updates the local state with the latest object values accordingly.</li></ul><p>RPCs: A Sui Full node exposes Sui RPC endpoints for querying the latest state of the system, including both the latest state metadata (such as, sui_getProtocolConfig), and the latest state object data (sui_getObject).</p><p>Transaction submission: Each Sui Full node orchestrates transaction submission to the quorum of the Sui Validators, and, optionally if configured, locally executes the finalized transactions (called fast path execution), which circumvents the wait for checkpoint synchronization.</p><p>*this subsection comes directly from Sui documentation</p><h4>Step 1 — Understanding the App Requirements</h4><h4>Hardware requirements</h4><p>Suggested minimum hardware to run a Sui Full node on mainnet:</p><ul><li>CPUs: 8 physical cores / 16 vCPUs</li><li>RAM: 128 GB</li><li>Storage (SSD): 3.7TB+ NVMe drive</li></ul><h4>Step 2 — App Configuration</h4><p>We keep a reference folder in <strong>cookbooks/sui/node/sui_config</strong></p><ul><li>archival-fallback.yaml</li><li>fullnode.yaml</li><li>p2p-mainnet</li><li>p2p-testnet</li></ul><h4>Generating node Kubernetes configs</h4><p>…for every combination of</p><ul><li>Network (devnet, testnet, mainnet)</li><li>Cloud + Local NVMe on K8s (AWS, GCP, DigitalOcean)</li><li>Archival Fallback</li><li>Snapshot Integration</li><li>Authenticated API setup for https RPC urls.</li><li>With sidecar Hercules</li><li>With service monitor for observability with Prometheus</li></ul><h4>Which generates 288 distinct Kubernetes configs across every option possible</h4><p>These templated configs then are added or dynamically overwritten to build configs for every network type &amp; many configuration variations for full nodes.</p><pre>type SuiConfigOpts struct {<br> DownloadSnapshot bool   `json:&quot;downloadSnapshot&quot;`<br> Network          string `json:&quot;network&quot;`</pre><pre> CloudProvider string `json:&quot;cloudProvider&quot;`<br> WithLocalNvme bool   `json:&quot;withLocalNvme&quot;`</pre><pre> WithIngress          bool `json:&quot;withIngress&quot;`<br> WithServiceMonitor   bool `json:&quot;withServiceMonitor&quot;`<br> WithArchivalFallback bool `json:&quot;withArchivalFallback&quot;`<br> WithHercules         bool `json:&quot;withHercules&quot;`<br>}</pre><h4>Which is passed into the below function to build the node config</h4><pre>func GetSuiClientClusterDef(cfg SuiConfigOpts) zeus_cluster_config_drivers.ClusterDefinition {<br> return zeus_cluster_config_drivers.ClusterDefinition{<br>  ClusterClassName: strings.ToLower(Sui) + &quot;-&quot; + strings.ToLower(cfg.Network) + &quot;-&quot; + strings.ToLower(cfg.CloudProvider),<br>  ComponentBases:   GetSuiConfig(cfg),<br> }<br>}</pre><pre>func GetSuiConfig(cfg SuiConfigOpts) map[string]zeus_cluster_config_drivers.ComponentBaseDefinition {<br> suiComponentBases = map[string]zeus_cluster_config_drivers.ComponentBaseDefinition{<br>    Sui: GetSuiClientNetworkConfigBase(cfg),<br> }<br> if cfg.WithIngress {<br>    suiComponentBases[SuiIngress] = suiIngressComponentBase<br> }<br> if cfg.WithServiceMonitor {<br>    suiComponentBases[SuiServiceMonitor] = suiServiceMonitorComponentBase<br> }<br> return suiComponentBases<br>}</pre><h4>Which overrides config values like this</h4><pre>dataDir := &quot;/data&quot;<br> switch cfg.CloudProvider {<br> case &quot;aws&quot;:<br>    dataDir = aws_nvme.AwsNvmePath<br> case &quot;gcp&quot;:<br>    dataDir = gcp_nvme.GcpNvmePath<br> case &quot;do&quot;:<br>    dataDir = do_nvme.DoNvmePath<br> }<br> if !cfg.WithLocalNvme {<br>    dataDir = &quot;/data&quot;<br> }<br> var storageClassName *string<br> if cfg.WithLocalNvme {<br>    storageClassName = aws.String(zeus_nvme.ConfigureCloudProviderStorageClass(cfg.CloudProvider))<br> }<br> if !cfg.WithArchivalFallback {<br>    entryPointScript = &quot;noFallBackEntrypoint.sh&quot;<br> }<br> var envAddOns []v1Core.EnvVar<br> if cfg.WithArchivalFallback {<br>    s3AccessKey := zeus_topology_config_drivers.MakeSecretEnvVar(&quot;AWS_ACCESS_KEY_ID&quot;, &quot;AWS_ACCESS_KEY_ID&quot;, &quot;aws-credentials&quot;)<br>    s3SecretKey := zeus_topology_config_drivers.MakeSecretEnvVar(&quot;AWS_SECRET_ACCESS_KEY&quot;, &quot;AWS_SECRET_ACCESS_KEY&quot;, &quot;aws-credentials&quot;)<br>    envAddOns = []v1Core.EnvVar{s3AccessKey, s3SecretKey}<br> }</pre><h4>Why generate configs this way?</h4><p>It’s by far the most efficient way to generate matrix type application configurations, eg ones with many different config variations, <strong>and the only real way to actually unit test Kubernetes configs </strong>are correct using strongly typed Go code.</p><p><strong>Meaning the odds of mistakes goes down to near zero.<br>Meaning you can support 10x the options with 1/10th the work.</strong></p><pre>func (t *SuiCookbookTestSuite) TestSuiTestnetCfg() {<br> cfg := SuiConfigOpts{<br>  WithLocalNvme:    true,<br>  DownloadSnapshot: false,<br>  WithIngress:      false,<br>  CloudProvider:    &quot;do&quot;,<br>  Network:          testnet,<br> }<br> t.generateFromConfigDriverBuilder(cfg)</pre><pre> p := SuiMasterChartPath<br> p.DirIn = &quot;./sui/node/custom_sui&quot;<br> inf := topology_workloads.NewTopologyBaseInfraWorkload()<br> err := p.WalkAndApplyFuncToFileType(&quot;.yaml&quot;, inf.DecodeK8sWorkload)<br> t.Require().Nil(err)<br> t.Nil(inf.Ingress)<br> t.Nil(inf.Deployment)<br> t.NotNil(inf.StatefulSet)<br> t.NotNil(inf.Service)<br> t.NotNil(inf.ConfigMap)</pre><pre> t.NotNil(inf.StatefulSet.Spec.VolumeClaimTemplates)<br> t.Len(inf.StatefulSet.Spec.VolumeClaimTemplates, 1)<br> t.Require().NotNil(inf.StatefulSet.Spec.VolumeClaimTemplates[0].Spec.Resources.Requests)<br> t.Equal(*inf.StatefulSet.Spec.VolumeClaimTemplates[0].Spec.Resources.Requests.Storage(), resource.MustParse(testnetDiskSize))<br> t.Require().NotNil(inf.StatefulSet.Spec.VolumeClaimTemplates[0].Spec.StorageClassName)<br> t.Require().Equal(*inf.StatefulSet.Spec.VolumeClaimTemplates[0].Spec.StorageClassName, do_nvme.DoStorageClass)<br>}</pre><h3>Kubernetes Core Node Components</h3><h3>StatefulSet</h3><h4>Init Snapshots</h4><p>We have the startup command to download the Sui snapshot if desired, and gets the correct genesis blob files downloaded as well for devnet, testnet, and mainnet. You’ll have to adjust the below command if you want to download a specific epoch.</p><pre>cmd := exec.Command(<br>  &quot;aws&quot;,<br>  &quot;s3&quot;,<br>  &quot;cp&quot;,<br>  s3,<br>  dbPathExt,<br>  &quot;--recursive&quot;,<br>  &quot;--no-sign-request&quot;,<br> )<br> log.Info().Msgf(&quot;SuiDownloadSnapshotS3: downloading snapshot using aws cli cmd:&quot;, cmd.String())</pre><pre> cmd.Stdout = &amp;out<br> cmd.Stderr = &amp;stderr<br> err := cmd.Run()<br> if err != nil {<br>  log.Warn().Err(err).Str(&quot;stdout&quot;, out.String()).Str(&quot;stderr&quot;, stderr.String()).Msg(&quot;error downloading snapshot from S3&quot;)<br>  log.Err(err).Str(&quot;stdout&quot;, out.String()).Str(&quot;stderr&quot;, stderr.String()).Msg(&quot;error downloading snapshot from S3&quot;)<br>  return fmt.Errorf(&quot;error downloading snapshot from S3: %v&quot;, err)<br> }</pre><p>We then have this stage which downloads the necessary information if missing before starting the node.</p><pre>- name: init-snapshots<br>  image: &quot;zeusfyi/snapshots:latest&quot;<br>  imagePullPolicy: Always<br>  command: [ &quot;/bin/sh&quot; ]<br>  args: [ &quot;-c&quot;,&quot;/scripts/download.sh&quot; ]<br>  env:<br>    - name: AWS_DEFAULT_REGION<br>      value: &quot;us-east-1&quot;<br>  resources:<br>    { }<br>  volumeMounts:<br>    - name: cm-sui<br>      mountPath: &quot;/scripts&quot;<br>    - name: sui-client-storage<br>      mountPath: &quot;/data&quot;</pre><h4>Resources</h4><p>If you want to change these parameters, we’d advise you to add some margin so that it doesn’t run into a scheduling issue.</p><p>eg. A server may say 128GB, but it may need to run other background software and only 126GB is available for instance, so setting a request for 128GB will prevent your app from ever using that machine.</p><pre>resources:<br>  limits:<br>    cpu: &quot;15&quot;<br>    memory: &quot;110Gi&quot;<br>  requests:<br>    cpu: &quot;15&quot;<br>    memory: &quot;110Gi&quot;</pre><h4>Disk Selection</h4><p>We use zK8s to let us easily switch out the storage class to the desired one. Otherwise you’ll need to adjust the below, which is setup to use the cloud provider standard block storage option.</p><pre>volumeClaimTemplates:<br>    - metadata:<br>        name: sui-client-storage<br>      spec:<br>        accessModes:<br>          - ReadWriteOnce<br>        storageClassName: fast-disks<br>        resources:<br>          requests:<br>            storage: &quot;4Ti&quot;</pre><h4>Config Map Components</h4><h4>Snapshot</h4><pre>download.sh: |-<br>    #!/bin/sh<br>    exec snapshots --downloadURL=&quot;&quot; --protocol=&quot;sui&quot; --network=&quot;mainnet&quot; --workload-type=&quot;full&quot; --dataDir=&quot;/data&quot;</pre><h4>Copying secrets into in-memory file system</h4><pre>entrypoint.sh: |-<br>    #!/bin/sh<br>    cp /scripts/fullnode.yaml /secrets/fullnode.yaml<br>    sed -i &quot;s/&lt;AWS_ACCESS_KEY_ID&gt;/$AWS_ACCESS_KEY_ID/g&quot; /secrets/fullnode.yaml<br>    sed -i &quot;s/&lt;AWS_SECRET_ACCESS_KEY&gt;/$AWS_SECRET_ACCESS_KEY/g&quot; /secrets/fullnode.yaml<br>    exec sui-node --config-path /secrets/fullnode.yaml</pre><h4>Node</h4><p>We also use zK8s to build the final node configs, since it adds on the relevant p2p table by network parameter, updates the db paths if needed, and appends the archival fallback option on.</p><pre>fullnode.yaml: |-<br>    # Update this value to the location you want Sui to store its database<br>    db-path: &quot;/data&quot;</pre><pre>    network-address: &quot;/dns/0.0.0.0/tcp/8080/http&quot;<br>    metrics-address: &quot;0.0.0.0:9184&quot;<br>    # this address is also used for web socket connections<br>    json-rpc-address: &quot;0.0.0.0:9000&quot;<br>    enable-event-processing: true</pre><pre>    genesis:<br>      # Update this to the location of where the genesis file is stored<br>      genesis-file-location: &quot;/data/genesis.blob&quot;<br>    authority-store-pruning-config:<br>      # Number of epoch dbs to keep <br>      # Not relevant for object pruning<br>      num-latest-epoch-dbs-to-retain: 3<br>      # The amount of time, in seconds, between running the object pruning task.<br>      # Not relevant for object pruning<br>      epoch-db-pruning-period-secs: 3600<br>      # Number of epochs to wait before performing object pruning.<br>      num-epochs-to-retain: 0<br>      # Advanced setting: Maximum number of checkpoints to prune in a batch. The default<br>      # settings are appropriate for most use cases.<br>      max-checkpoints-in-batch: 10<br>      # Advanced setting: Maximum number of transactions in one batch of pruning run. The default<br>      # settings are appropriate for most use cases.<br>      max-transactions-in-batch: 1000<br>      # Not documented anywhere but necessary for pruning to work<br>      use-range-deletion: true<br>      # Used for tx pruning<br>      # Number of epochs to wait before performing transaction pruning.<br>      # When this is N (where N &gt;= 2), Sui prunes transactions and effects from <br>      # checkpoints up to the `current - N` epoch. Sui never prunes transactions and effects from the current and<br>      # immediately prior epoch. N = 2 is a recommended setting for Sui Validator nodes and Sui Full nodes that don&#39;t <br>      # serve RPC requests.<br>      #num-epochs-to-retain-for-checkpoints: 2<br>      # Ensures that individual database files periodically go through the compaction process.<br>      # This helps reclaim disk space and avoid fragmentation issues<br>      #periodic-compaction-threshold-days: 1</pre><h4>zK8s Cluster Definition</h4><pre>var (<br> suiNodeDefinition = zeus_cluster_config_drivers.ClusterDefinition{<br>    ClusterClassName: Sui,<br>    ComponentBases:   suiComponentBases,<br> }<br> suiComponentBases = map[string]zeus_cluster_config_drivers.ComponentBaseDefinition{<br>    Sui: suiMasterComponentBase,<br> }<br> suiMasterComponentBase = zeus_cluster_config_drivers.ComponentBaseDefinition{<br>  SkeletonBases: map[string]zeus_cluster_config_drivers.ClusterSkeletonBaseDefinition{<br>     Sui: suiSkeletonBaseConfig,<br>  },<br> }<br> suiSkeletonBaseConfig = zeus_cluster_config_drivers.ClusterSkeletonBaseDefinition{<br>   SkeletonBaseNameChartPath: SuiMasterChartPath,<br> }<br> SuiMasterChartPath = filepaths.Path{<br>    DirIn:       &quot;./sui/node/infra&quot;,<br>    DirOut:      &quot;./sui/output&quot;,<br>    FnIn:        Sui, // filename for your gzip workload<br> }</pre><h3>Config Overrides</h3><p>Using the zK8s style of coding Kubernetes apps lets us create a wide variation in application configuration choices from a relatively simple place. You can easily manage a single page that distills and condenses all the most changes into a handful of top-level parameters, which we created a Sui specific one for toggling add-ons to the base config using SuiConfigOpts.</p><p>How does this compare to your current workflows? Let us know in the comments!</p><pre>const (<br>    // networks<br>    mainnet = &quot;mainnet&quot;<br>    testnet = &quot;testnet&quot;<br>    devnet  = &quot;devnet&quot;</pre><pre>    // docker image references<br>    dockerImage        = &quot;mysten/sui-node:mainnet&quot;<br>    dockerImageTestnet = &quot;mysten/sui-node:testnet&quot;<br>    dockerImageDevnet  = &quot;mysten/sui-node:devnet&quot;</pre><pre>    hercules = &quot;hercules&quot;</pre><pre>    // mainnet workload compute resources<br>    cpuCores   = &quot;16&quot;<br>    memorySize = &quot;128Gi&quot;<br>    // mainnet workload disk sizes<br>    mainnetDiskSize = &quot;4Ti&quot;</pre><pre>    // testnet compute resources<br>    cpuCoresTestnet   = &quot;7500m&quot;<br>    memorySizeTestnet = &quot;63Gi&quot;<br>    // testnet workload disk sizes<br>    testnetDiskSize = &quot;3Ti&quot;<br>    devnetDiskSize  = &quot;2Ti&quot;</pre><pre>    // workload label, name, or k8s references<br>    suiDiskName  = &quot;sui-client-storage&quot;<br>    suiConfigMap = &quot;cm-sui&quot;</pre><pre>    // workload type, impacts where/if for snapshot downloads<br>    suiNodeConfig      = &quot;full&quot;<br>    suiValidatorConfig = &quot;validator&quot;<br>    suiNoSnapshot      = &quot;min&quot;</pre><pre>    SuiRpcPortName = &quot;http-rpc&quot;</pre><pre>    DownloadMainnet = &quot;downloadMainnetNode&quot;<br>)</pre><pre>type SuiConfigOpts struct {<br>    DownloadSnapshot bool   `json:&quot;downloadSnapshot&quot;`<br>    Network          string `json:&quot;network&quot;`</pre><pre>    CloudProvider string `json:&quot;cloudProvider&quot;`<br>    WithLocalNvme bool   `json:&quot;withLocalNvme&quot;`</pre><pre>    WithIngress          bool `json:&quot;withIngress&quot;`<br>    WithServiceMonitor   bool `json:&quot;withServiceMonitor&quot;`<br>    WithArchivalFallback bool `json:&quot;withArchivalFallback&quot;`<br>    WithHercules         bool `json:&quot;withHercules&quot;`<br>}</pre><pre>func GetSuiClientNetworkConfigBase(cfg SuiConfigOpts) zeus_cluster_config_drivers.ComponentBaseDefinition {<br>    diskSize := mainnetDiskSize<br>    cpuSize := cpuCores<br>    memSize := memorySize<br>    dockerImageSui := dockerImage<br>    entryPointScript := &quot;entrypoint.sh&quot;<br>    switch cfg.Network {<br>    case mainnet:<br>       cpuSize = cpuCores<br>       memSize = memorySize<br>       diskSize = mainnetDiskSize<br>       dockerImageSui = dockerImage<br>    case testnet:<br>       diskSize = testnetDiskSize<br>       cpuSize = cpuCoresTestnet<br>       memSize = memorySizeTestnet<br>       dockerImageSui = dockerImageTestnet<br>    case devnet:<br>       diskSize = devnetDiskSize<br>       cpuSize = cpuCoresTestnet<br>       memSize = memorySizeTestnet<br>       dockerImageSui = dockerImageDevnet<br>       entryPointScript = &quot;noFallBackEntrypoint.sh&quot;<br>    }</pre><pre>    sd := &amp;config_overrides.ServiceDriver{}<br>    if cfg.WithIngress {<br>       sd.AddNginxTargetPort(&quot;nginx&quot;, SuiRpcPortName)<br>    }</pre><pre>    dataDir := &quot;/data&quot;<br>    switch cfg.CloudProvider {<br>    case &quot;aws&quot;:<br>       dataDir = aws_nvme.AwsNvmePath<br>    case &quot;gcp&quot;:<br>       dataDir = gcp_nvme.GcpNvmePath<br>    case &quot;do&quot;:<br>       dataDir = do_nvme.DoNvmePath<br>    }<br>    if !cfg.WithLocalNvme {<br>       dataDir = &quot;/data&quot;<br>    }<br>    var storageClassName *string<br>    if cfg.WithLocalNvme {<br>       storageClassName = aws.String(zeus_nvme.ConfigureCloudProviderStorageClass(cfg.CloudProvider))<br>    }<br>    if !cfg.WithArchivalFallback {<br>       entryPointScript = &quot;noFallBackEntrypoint.sh&quot;<br>    }<br>    var envAddOns []v1Core.EnvVar<br>    if cfg.WithArchivalFallback {<br>       s3AccessKey := config_overrides.MakeSecretEnvVar(&quot;AWS_ACCESS_KEY_ID&quot;, &quot;AWS_ACCESS_KEY_ID&quot;, &quot;aws-credentials&quot;)<br>       s3SecretKey := config_overrides.MakeSecretEnvVar(&quot;AWS_SECRET_ACCESS_KEY&quot;, &quot;AWS_SECRET_ACCESS_KEY&quot;, &quot;aws-credentials&quot;)<br>       envAddOns = []v1Core.EnvVar{s3AccessKey, s3SecretKey}<br>    }</pre><pre>    wkType := &quot;full&quot;<br>    if !cfg.DownloadSnapshot {<br>       wkType = &quot;min&quot;<br>    }<br>    downloadCmd := fmt.Sprintf(&quot;#!/bin/sh\nexec snapshots --downloadURL=\&quot;\&quot; --protocol=\&quot;sui\&quot; --network=\&quot;%s\&quot; --workload-type=\&quot;%s\&quot; --dataDir=\&quot;%s\&quot;&quot;, cfg.Network, wkType, dataDir)<br>    sbCfg := zeus_cluster_config_drivers.ClusterSkeletonBaseDefinition{<br>       SkeletonBaseChart:         zeus_req_types.TopologyCreateRequest{},<br>       SkeletonBaseNameChartPath: SuiMasterChartPath,<br>       TopologyConfigDriver: &amp;config_overrides.TopologyConfigDriver{<br>          ConfigMapDriver: &amp;config_overrides.ConfigMapDriver{<br>             ConfigMap: v1Core.ConfigMap{<br>                ObjectMeta: metav1.ObjectMeta{Name: suiConfigMap},<br>                Data: map[string]string{<br>                   &quot;fullnode.yaml&quot;: OverrideNodeConfigDataDir(dataDir, cfg),<br>                   &quot;download.sh&quot;:   downloadCmd,<br>                },<br>             },<br>          },<br>          ServiceDriver: sd,<br>          StatefulSetDriver: &amp;config_overrides.StatefulSetDriver{<br>             ContainerDrivers: map[string]config_overrides.ContainerDriver{<br>                Sui: {<br>                   Container: v1Core.Container{<br>                      Name:      Sui,<br>                      Image:     dockerImageSui,<br>                      Resources: config_overrides.CreateComputeResourceRequirementsLimit(cpuSize, memSize),<br>                      VolumeMounts: []v1Core.VolumeMount{{<br>                         Name:      suiDiskName,<br>                         MountPath: dataDir,<br>                      }},<br>                      Command: []string{fmt.Sprintf(&quot;/scripts/%s&quot;, entryPointScript)},<br>                   },<br>                   AppendEnvVars: envAddOns,<br>                },<br>                &quot;hercules&quot;: {<br>                   Container: v1Core.Container{<br>                      Name: &quot;hercules&quot;,<br>                      VolumeMounts: []v1Core.VolumeMount{{<br>                         Name:      suiDiskName,<br>                         MountPath: dataDir,<br>                      }},<br>                   },<br>                   IsDeleteContainer: !cfg.WithHercules,<br>                },<br>                &quot;init-snapshots&quot;: {<br>                   Container: v1Core.Container{<br>                      Name: &quot;init-snapshots&quot;,<br>                      VolumeMounts: []v1Core.VolumeMount{{<br>                         Name:      suiDiskName,<br>                         MountPath: dataDir,<br>                      }},<br>                   },<br>                   IsInitContainer: true,<br>                },<br>                &quot;init-chown-data&quot;: {<br>                   Container: v1Core.Container{<br>                      Name:    &quot;init-chown-data&quot;,<br>                      Command: []string{&quot;chown&quot;, &quot;-R&quot;, &quot;10001:10001&quot;, dataDir},<br>                      VolumeMounts: []v1Core.VolumeMount{{<br>                         Name:      suiDiskName,<br>                         MountPath: dataDir,<br>                      }},<br>                   },<br>                   IsInitContainer: true,<br>                },<br>             },<br>             PVCDriver: &amp;config_overrides.PersistentVolumeClaimsConfigDriver{<br>                PersistentVolumeClaimDrivers: map[string]v1Core.PersistentVolumeClaim{<br>                   suiDiskName: {<br>                      ObjectMeta: metav1.ObjectMeta{Name: suiDiskName},<br>                      Spec: v1Core.PersistentVolumeClaimSpec{<br>                         Resources:        config_overrides.CreateDiskResourceRequirementsLimit(diskSize),<br>                         StorageClassName: storageClassName,<br>                      },<br>                   },<br>                }},<br>          },<br>       }}<br>    suiCompBase := zeus_cluster_config_drivers.ComponentBaseDefinition{<br>       SkeletonBases: map[string]zeus_cluster_config_drivers.ClusterSkeletonBaseDefinition{<br>          Sui: sbCfg,<br>       },<br>    }<br>    return suiCompBase<br>}</pre><h4>Learn more about Sui</h4><p><a href="https://docs.sui.io/learn/about-sui">Sui Components | Sui Documentation</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0b7bcf9de81a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introducing Serverless EVMs]]></title>
            <link>https://medium.com/@alexgeorge_18841/introducing-serverless-evms-9db3a927cb28?source=rss-843f4582c6d8------2</link>
            <guid isPermaLink="false">https://medium.com/p/9db3a927cb28</guid>
            <dc:creator><![CDATA[Alex George]]></dc:creator>
            <pubDate>Sun, 16 Feb 2025 20:39:49 GMT</pubDate>
            <atom:updated>2025-02-16T20:39:49.723Z</atom:updated>
            <content:encoded><![CDATA[<h4>Foundry’s Anvil as an EVM Simulation Environment on Demand</h4><h3>Overview</h3><p>A serverless on-demand EVM execution environment that you can use your provider’s endpoints to run Tx simulations, smart contract CI/CD, while also even load balancing your production traffic through our Adaptive RPC Load Balancer.</p><ul><li>Each serverless execution environment lasts for up to 10 minutes max, but you can end early to release.</li><li>Each environment contains an anvil service you can use for simulations/forks + automated smart contract CI/CD.</li><li>Each user during beta can run up to 5 concurrent serverless execution environments for free.</li><li>It will automatically convert hardhat_ prefixed JSON-RPC methods to the equivalent anvil_ method.</li><li>Integrated Go web3 client under pkg/artemis/web3/client on our GitHub repo for quick starting your project.</li><li>We disabled the embedded Anvil rate limiter, so you can use at full speed. NO_RATE_LIMITS=true</li></ul><h4>TLDR<a href="https://docs.zeus.fyi/docs/lb/guide/serverless#overview">​</a></h4><p>We’re democratizing access to simulation technology at scale by lowering the cost of simulation to near zero. For safer smart contracts, less exploits, more robust engineering by using isolated ephemeral environments per each test.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kwfJBOsbM3UjkiYuxLXHBg.png" /><figcaption>System Component Relationship Diagrams</figcaption></figure><h3>Serverless Sessions<a href="https://docs.zeus.fyi/docs/lb/guide/serverless#serverless-sessions">​</a></h3><p>You need to add a header with a unique session-id name of your choice, per each concurrent serverless environment.</p><pre>SERVERLESS_HEADER<br>    KEY: X-Anvil-Session-Lock-ID<br>    VALUE: 0 characters &lt; ANY string &lt; 256 characters<br>NETWORKS:<br>    LOCAL_HARDHAT: Don&#39;t add X-Route-Group<br>    ETHEREUM + Others: <br>        KEY: X-Route-Group<br>        VALUE: Table-Name (eg. ethereum-mainnet)</pre><h3>What we show in under 60 seconds…<a href="https://docs.zeus.fyi/docs/lb/guide/serverless#what-we-show-in-under-60-seconds">​</a></h3><h3>Creating a local hardhat serverless session (no X-Route-Group header)<a href="https://docs.zeus.fyi/docs/lb/guide/serverless#creating-a-local-hardhat-serverless-session-no-x-route-group-header">​</a></h3><ul><li>Calls eth_chainId to confirm local hardhat session</li></ul><pre>curl --location &#39;https://iris.zeus.fyi/v1/router&#39; \<br>--header &#39;X-Anvil-Session-Lock-ID: local-hardhat-env&#39; \<br>--header &#39;Content-Type: application/json&#39; \<br>--header &#39;Authorization: Bearer BEARER&#39; \<br>--data &#39;{<br>    &quot;jsonrpc&quot;: &quot;2.0&quot;,<br>    &quot;method&quot;: &quot;eth_chainId&quot;,<br>    &quot;params&quot;: [],<br>    &quot;id&quot;: 1<br>}&#39;</pre><h3>Creating a mainnet serverless session (with X-Route-Group header)<a href="https://docs.zeus.fyi/docs/lb/guide/serverless#creating-a-mainnet-serverless-session-with-x-route-group-header">​</a></h3><ul><li>Adds X-Route-Group: ethereum-mainnet header to the request</li><li>Creates a second serverless session with a different X-Anvil-Session-Lock-ID header</li></ul><pre>curl --location &#39;https://iris.zeus.fyi/v1/router&#39; \<br>--header &#39;X-Anvil-Session-Lock-ID: test-fork-mainnet&#39; \<br>--header &#39;X-Route-Group: ethereum-mainnet&#39; \<br>--header &#39;Content-Type: application/json&#39; \<br>--header &#39;Authorization: Bearer BEARER&#39; \<br>--data &#39;{<br>    &quot;jsonrpc&quot;: &quot;2.0&quot;,<br>    &quot;method&quot;: &quot;eth_chainId&quot;,<br>    &quot;params&quot;: [],<br>    &quot;id&quot;: 1<br>}&#39;</pre><h3>Creating an ethereum serverless session (with X-Route-Group header)<a href="https://docs.zeus.fyi/docs/lb/guide/serverless#creating-an-ethereum-serverless-session-with-x-route-group-header">​</a></h3><h4>Using a pinned block number<a href="https://docs.zeus.fyi/docs/lb/guide/serverless#using-a-pinned-block-number">​</a></h4><pre>{<br>  &quot;jsonrpc&quot;: &quot;2.0&quot;,<br>  &quot;method&quot;: &quot;anvil_reset&quot;,<br>  &quot;params&quot;: [<br>    {<br>      &quot;forking&quot;: {<br>        &quot;jsonRpcUrl&quot;: &quot;http://localhost:8545&quot;,<br>        &quot;blockNumber&quot;: 14390000<br>      }<br>    }<br>  ],<br>  &quot;id&quot;: 1<br>}</pre><h4>Using latest block number<a href="https://docs.zeus.fyi/docs/lb/guide/serverless#using-latest-block-number">​</a></h4><pre>{<br>  &quot;jsonrpc&quot;: &quot;2.0&quot;,<br>  &quot;method&quot;: &quot;anvil_reset&quot;,<br>  &quot;params&quot;: [<br>    {<br>      &quot;forking&quot;: {<br>        &quot;jsonRpcUrl&quot;: &quot;http://localhost:8545&quot;<br>      }<br>    }<br>  ],<br>  &quot;id&quot;: 1<br>}</pre><h4>Calls get block number to confirm session<a href="https://docs.zeus.fyi/docs/lb/guide/serverless#calls-get-block-number-to-confirm-session">​</a></h4><pre>{<br>  &quot;jsonrpc&quot;: &quot;2.0&quot;,<br>  &quot;method&quot;: &quot;eth_blockNumber&quot;,<br>  &quot;params&quot;: [],<br>  &quot;id&quot;: 1<br>}</pre><h4>How to use the load balancer with your serverless session<a href="https://docs.zeus.fyi/docs/lb/guide/serverless#how-to-use-the-load-balancer-with-your-serverless-session">​</a></h4><ul><li>Using your pre-existing routing table header (eg. ethereum-mainnet)</li></ul><h4>How to end your serverless session<a href="https://docs.zeus.fyi/docs/lb/guide/serverless#how-to-end-your-serverless-session">​</a></h4><ul><li>By using a X-End-Session-Lock-ID header with your X-Anvil-Session-Lock-ID value</li></ul><h3>YouTube Walkthrough</h3><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FKXkFGW4DGPU%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DKXkFGW4DGPU&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FKXkFGW4DGPU%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/f35deedfd222096d6499a2adfe335bde/href">https://medium.com/media/f35deedfd222096d6499a2adfe335bde/href</a></iframe><h3>Beta Testers Get Access to These Free Services</h3><h4>for a Limited Time</h4><h3>Up to 5 concurrent serverless EVM environments</h3><h4>+ Unlimited free access to our Ethereum mainnet mempool service.</h4><p>At a level which is comparable to</p><ul><li>Blox — Enterprise/Enterprise-Elite ($1250–5000/mo)</li><li>Blocknative — Growth1-Growth2 ($1250–5000/mo)</li></ul><p>To use the service, just create a websocket subscription like the below, and it’ll stream mempool transactions to you in real time. Don’t forget to add your bearer token to the request header.</p><p>wss://iris.zeus.fyi/v1/mempool</p><pre>addr := flag.String(&quot;addr&quot;, &quot;iris.zeus.fyi&quot;, &quot;ws service address&quot;)<br>u := url.URL{Scheme: &quot;wss&quot;, Host: *addr, Path: &quot;/v1/mempool&quot;}</pre><pre>requestHeader := http.Header{}<br>requestHeader.Add(&quot;Authorization&quot;, &quot;Bearer &quot;+t.BearerToken)<br>ws, _, werr := websocket.DefaultDialer.Dial(u.String(), requestHeader)</pre><h3>Top Reason to Use the Adaptive RPC Load Balancer?<a href="https://docs.zeus.fyi/docs/lb/guide/serverless#top-reason-to-use-the-adaptive-rpc-load-balancer">​</a></h3><p>There’s many, but the top one? People are sick of hitting 429 rate limiting and 5xx errors. What’s double worse is paying for the request that failed. So we set out to solve this problem.</p><p>Now there’s a solution, backed by extensive studies. Turn many endpoints into one super endpoint that handles the scale you need without the errors. It can handle Nx more requests with N being the number of requests/sec than any single endpoint can handle. That’s in addition to the other significant proven performance gains and error rate reductions you can expect from our adaptive load balancing technology, see our benchmarking section for details.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9db3a927cb28" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Adaptive RPC Load Balancer]]></title>
            <link>https://medium.com/@alexgeorge_18841/adaptive-rpc-load-balancer-5296e8d0d1f7?source=rss-843f4582c6d8------2</link>
            <guid isPermaLink="false">https://medium.com/p/5296e8d0d1f7</guid>
            <dc:creator><![CDATA[Alex George]]></dc:creator>
            <pubDate>Sun, 16 Feb 2025 20:37:58 GMT</pubDate>
            <atom:updated>2025-02-16T20:37:58.783Z</atom:updated>
            <content:encoded><![CDATA[<h4>Accurate, Reliable, Performant Traffic</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UyqYE-n8jgPXN3uGg_1bIw.png" /><figcaption>Latency Metrics Box Plots (p25-p75 in colored box range)</figcaption></figure><p>Web3 has transformed the digital world in numerous ways, unlocking decentralized applications (dApps) and offering unique opportunities to innovators and developers. But with every revolution, there are challenges. One significant pain point for many dApp developers has been the unpredictability and inconsistency in node data accuracy.</p><h4>The Web3 Accuracy Dilemma</h4><p>Before diving into our solution, let’s revisit the problem. dApp users expect consistent and correct data when they interact with their favorite applications. Yet, due to variances among nodes due to the nature of distributed p2p networks that’s often not the case.</p><p>Running a single node has its benefits, especially in terms of consistency. Yet, it poses significant scalability and reliability problems. You’re constrained by its capacity, and if it fails, your entire dApp goes offline.</p><p>Using a traditional cloud load balancer brings more scale and reliability than a single node. However, it sacrifices accuracy. dApp traffic might be directed to a node that doesn’t have the most recent information, leading to conflicts, failed transactions.</p><h4>Introducing our Adaptive RPC Load Balancer</h4><p>We’ve used our experience in delivering industry leading web3 infra products at Coinbase and custom built a cloud native software load balancer that ensures dApps receive consistent and accurate data at scale.</p><p>Here’s why you should consider switching</p><h4>1. Intuitive Dashboard UI &amp; APIs</h4><p>Use a single endpoint and only change your header to switch between groups of nodes categorized for specific purposes like indexing, or between network and chain options.</p><h4>2. Tip of Chain Data By Default</h4><p>No more outdated data. Get the latest tip of chain data and stay ahead of the competition one block at a time.</p><h4>3. Adaptive Load Balancing Algorithm</h4><p>Our load balancer comes with adaptive load balancing that’s scientifically proven to help shape load balancing distribution in the most efficient way possible in real-time using <a href="https://github.com/tdunning/t-digest">t-digest</a> driven latency statistics. <strong>You won’t find this anywhere else, or any comparable alternative.</strong></p><p><strong>Shown to improve average latency by 5–15%, and reduction in error rates by 50% </strong>when compared to the round robin alternative in many real world cases.</p><h3>The Adaptive Algorithm:</h3><p>T-Digest is a groundbreaking statistical tool designed for efficiently estimating quantiles and cumulative distribution functions with high accuracy. When integrated into our adaptive algorithm, T-Digest’s unique capabilities shine even brighter. By constantly analyzing feedback from latency and error statistics, the adaptive algorithm crafts a control loop that diligently fine-tunes performance. The result? Significant latency and error rate reductions with observed improvements of 50% over traditional round robin approaches. By integrating T-Digest and this adaptive mechanism, we’re not just reacting to changes — we’re anticipating them, setting a new benchmark for real-time performance enhancement.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rUtvHhgkWfcs1mXAkt5yzw.png" /><figcaption>Box Plot Charts: Illustrating Latency Ranges by Percentile</figcaption></figure><h3>Adaptive Priority Score Tuning</h3><p>Our adaptive algorithm is set with reasonable defaults that work well for most applications. However, it also allows you to tune how the algorithm scores your endpoints so that you can find the optimal solution for your specific application. The lowest priority scored route is selected at run-time. We expose the ability to tune scores using latency &amp; error rates as well as how quickly scores decay towards the baseline.</p><h4>Latency</h4><p>Your adjusted priority score after each request is calculated as</p><pre>newScore = currentScore x (latency(percentile) + latencyScaleFactor).</pre><h4>Error</h4><p>Whenever a 4xx or 5xx error is returned, the error scale factor is used to adjust the priority score. Your adjusted priority score is calculated as</p><pre>newScore = currentScore x errorScaleFactor.</pre><h4>Decay</h4><p>Whenever N (number of table endpoints == adaptive requests) have been made relative to an endpoint your adjusted priority score is calculated as</p><pre>newScore = currentScore x decayScaleFactor.</pre><p>Statistics expire after 1 hour since the last request to the table was seen. Not to worry though, since it only takes 20 samples per metric to accurately model and dynamically adjust your priority scores.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wClYTc5VnEmg0Ss3q3fNlA.png" /><figcaption>Use the slider to adjust your scoring weights and then press update to take effect.</figcaption></figure><h3>Procedures</h3><p>We provide a handful of embedded max block height routing procedures that cover most protocols. Simply append the procedure key-value to the existing JSON-RPC payload and we’ll take care of the rest. We’ll poll your routes for their block number, and then only send your request to the endpoints at the highest block and return the first successful response.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0LtzzicOyR4ffmU0eqyGfQ.png" /><figcaption>You can send live sample requests directly from the UI</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5296e8d0d1f7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hosted Docusaurus in 5 Minutes and Under $10/Month]]></title>
            <link>https://medium.com/@alexgeorge_18841/hosted-docusaurus-in-5-minutes-and-under-10-month-2ffcf7d82887?source=rss-843f4582c6d8------2</link>
            <guid isPermaLink="false">https://medium.com/p/2ffcf7d82887</guid>
            <dc:creator><![CDATA[Alex George]]></dc:creator>
            <pubDate>Wed, 15 Jan 2025 20:46:10 GMT</pubDate>
            <atom:updated>2025-01-15T20:46:10.689Z</atom:updated>
            <content:encoded><![CDATA[<h4>Using zK8s our rapid Kubernetes development tooling</h4><h3>Introduction</h3><p>Developing Kubernetes applications is often complex and time-consuming, with a steep learning curve. However, the advent of zK8s is changing the game, allowing developers to build Kubernetes apps with pure Go code that’s functional, testable, and effortlessly turned into deployable infrastructure. This approach is not only faster and less error-prone compared to traditional methods but also ensures your workloads are explicitly defined. Let’s dive into how zK8s can help you host a Docusaurus site in a matter of minutes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FbXJ-WSraR2uBzCX1Z76PA.png" /><figcaption>Learn more about Docusaurus: <a href="https://docusaurus.io/docs">https://docusaurus.io/docs</a></figcaption></figure><h3>Workload Definitions Simplified</h3><p>With zK8s, defining a Kubernetes workload is straightforward. The WorkloadDefinition struct allows you to outline the specifics of your workload, such as the name, the number of replicas, and container configurations. Here&#39;s an example:</p><pre>type WorkloadDefinition struct {<br>   WorkloadName string                    `json:&quot;workloadName&quot;`<br>   ReplicaCount int                       `json:&quot;replicaCount&quot;`<br>   Containers   zk8s_templates.Containers `json:&quot;containers&quot;`<br>   FilePath     filepaths.Path            `json:&quot;-&quot;`<br>}</pre><pre>type Containers map[string]Container</pre><pre>type Container struct {<br>   IsInitContainer bool        `json:&quot;isInitContainer&quot;`<br>   ImagePullPolicy string      `json:&quot;imagePullPolicy,omitempty&quot;`<br>   DockerImage     DockerImage `json:&quot;dockerImage&quot;`<br>}</pre><pre>type DockerImage struct {<br>   ImageName            string               `json:&quot;imageName&quot;`<br>   Cmd                  string               `json:&quot;cmd&quot;`<br>   Args                 string               `json:&quot;args&quot;`<br>   ResourceRequirements ResourceRequirements `json:&quot;resourceRequirements,omitempty&quot;`<br>   EnvVars              []EnvVar             `json:&quot;envVars,omitempty&quot;`<br>   Ports                []Port               `json:&quot;ports,omitempty&quot;`<br>   VolumeMounts         []VolumeMount        `json:&quot;volumeMounts,omitempty&quot;`<br>}</pre><p>By setting a few minimal parameters, you’re able to generate a validly configured deployment, ingress, and service file with ease.</p><h3>Docusaurus Deployment Generation Function</h3><p>You simply call this function, and it’ll generate a Deployment, Service, and Ingress file that also prints out a copy of the generated workloads and then uploads them to the registered zK8s cluster class, in this case that is docusaurus-template. This is basically equivalent to packaging a Kubernetes app into a helm chart. We use zK8s cluster classes as our terminology because we also link workloads to more than just the Kubernetes config, we also link them to the actual context, namespace, and cloud provider when deployed as well. For your own docs site just update the docker image to your own, and it’s literally that simple.</p><pre>func CreateDocusaurusDeployment(zc zeus_client.ZeusClient, nc bool) error {<br>  wd := zeus_cluster_config_drivers.WorkloadDefinition{<br>    WorkloadName: &quot;docusaurus-template&quot;,<br>    ReplicaCount: 1,<br>    Containers: zk8s_templates.Containers{<br>     &quot;docusaurus-template&quot;: zk8s_templates.Container{<br>      ImagePullPolicy: &quot;Always&quot;,<br>      DockerImage: zk8s_templates.DockerImage{<br>         ImageName: &quot;docker.io/zeusfyi/docusaurus-template:latest&quot;,<br>         ResourceRequirements: zk8s_templates.ResourceRequirements{<br>            CPU:    &quot;100m&quot;,<br>            Memory: &quot;500Mi&quot;,<br>         },<br>         Ports: []zk8s_templates.Port{<br>           {<br>             Name:               &quot;http&quot;,<br>             Number:             &quot;3000&quot;,<br>             Protocol:           &quot;TCP&quot;,<br>             IngressEnabledPort: true,<br>             ProbeSettings: zk8s_templates.ProbeSettings{<br>                UseForLivenessProbe:  true,<br>                UseForReadinessProbe: true,<br>                UseTcpSocket:         true,<br>          },<br>         },<br>        },<br>      },<br>    },<br>  },<br>  FilePath: filepaths.Path{<br>     DirOut: &quot;./docusaurus/outputs&quot;,<br>     FnIn:   docusaurusTemplate,<br>  },<br> }<br> cd, err := zeus_cluster_config_drivers.GenerateDeploymentCluster(ctx, wd)<br> if err != nil {<br>    return err<br> }<br> cd.IngressPaths = map[string]zk8s_templates.IngressPath{<br>    wd.WorkloadName: {<br>     Path:     &quot;/&quot;,<br>     PathType: &quot;ImplementationSpecific&quot;,<br>    },<br> }<br> prt, err := zeus_cluster_config_drivers.PreviewTemplateGeneration(ctx, cd)<br> if err != nil {<br>    return err<br> }<br> if nc {<br>    gcd := zeus_cluster_config_drivers.CreateGeneratedClusterClassCreationRequest(cd)<br>    gcdExp := DocusaurusClusterDefinition.BuildClusterDefinitions()<br>    err = gcd.CreateClusterClassDefinitions(ctx, zc)<br>    if err != nil {<br>       return err<br>    }<br> }<br> _, err = prt.UploadChartsFromClusterDefinition(ctx, zc, true)<br> if err != nil {<br>  return err<br> }<br> return nil<br>}</pre><h3>Why use this over Helm or Kustomize? Help me understand how this compares to the alternatives.</h3><p>zK8s offers a compelling alternative to traditional Kubernetes workload definitions, particularly in comparison to those using YAML templating. The key advantage of zK8s lies in its simplicity and efficiency in defining workloads. With its WorkloadDefinition struct, users can easily specify crucial details like workload name, replica count, and container configurations without delving into the complexities of YAML’s syntax.</p><p>YAML, though widely used in web infrastructure, is often criticized for its intricacies and potential for errors due to its strict whitespace requirements, lack of type safety, and poor handling of conditional logic and functions. It can lead to hidden data type conversions and ambiguous settings, making it cumbersome for complex applications. This complexity is particularly concerning in high-stakes environments where configurations hold substantial financial assets, such as in cryptocurrency platforms.</p><p>In contrast, zK8s streamlines the configuration process, significantly reducing the risk of errors and the time spent troubleshooting. This is particularly beneficial for applications with high configuration variations or those involving numerous microservices. For example, managing different versions of a database like Postgres with varying configurations becomes far more manageable with zK8s. It supports efficient testing and packaging of thousands of variations, which is a challenging feat with traditional YAML-based setups.</p><p>Furthermore, zK8s’s approach to converting Kubernetes YAML into database models offers the benefits of relational data and SQL querying capabilities. This method facilitates easier deployment and management of infrastructure at scale, enabling quick and reliable updates, and efficient mapping of infrastructure to users. This aspect is especially advantageous for applications requiring dynamic, scalable infrastructure, where traditional GitOps tools like FluxCD and ArgoCD may fall short.</p><p>In summary, zK8s presents a more intuitive, efficient, and error-resistant approach to Kubernetes workload definition compared to YAML-based methods. Its ability to simplify complex configurations, combined with the advantages of database model conversion and API-based orchestration, makes it a superior choice for a wide range of applications, from solo developers to enterprise-level systems.</p><h3>How Does It Work?</h3><p>It uses the parameters from your Workload Definition to build Kubernetes Workloads from templates. It automatically labels, names, in the correct way by default. See this package for details.</p><h4>Open Source Code</h4><p><a href="https://github.com/zeus-fyi/zeus/tree/main/zeus/workload_config_drivers">workload_config_drivers</a>/<a href="https://github.com/zeus-fyi/zeus/tree/main/zeus/workload_config_drivers/zk8s_templates">zk8s_templates</a></p><pre>func GetDeploymentTemplate(ctx context.Context, name string) *v1.Deployment {<br> return &amp;v1.Deployment{<br>  TypeMeta: metav1.TypeMeta{<br>   Kind:       &quot;Deployment&quot;,<br>   APIVersion: &quot;apps/v1&quot;,<br>  },<br>  ObjectMeta: metav1.ObjectMeta{<br>   Name:   GetDeploymentName(ctx, name),<br>   Labels: GetLabels(ctx, name),<br>  },<br>  Spec: v1.DeploymentSpec{<br>   Selector: metav1.SetAsLabelSelector(GetSelector(ctx, name)),<br>   Template: v1Core.PodTemplateSpec{<br>    ObjectMeta: metav1.ObjectMeta{<br>     Labels: GetLabels(ctx, name),<br>    },<br>    Spec: v1Core.PodSpec{},<br>   },<br>   Strategy: v1.DeploymentStrategy{},<br>  },<br> }<br>}</pre><pre>func BuildDeploymentDriver(ctx context.Context, containers Containers, dep Deployment) (config_overrides.DeploymentDriver, error) {<br> rc := int32(dep.ReplicaCount)<br> depDriver := config_overrides.DeploymentDriver{<br>    ReplicaCount:     &amp;rc,<br>    ContainerDrivers: make(map[string]config_overrides.ContainerDriver),<br> }<br> for containerName, container := range containers {<br>  contDriver, err := BuildContainerDriver(ctx, containerName, container)<br>  if err != nil {<br>     log.Error().Err(err).Msg(&quot;Failed to build container driver&quot;)<br>   return config_overrides.DeploymentDriver{}, err<br>  }<br>  depDriver.ContainerDrivers[containerName] = config_overrides.ContainerDriver{<br>     IsAppendContainer: true,<br>     IsInitContainer:   container.IsInitContainer,<br>     Container:         contDriver,<br>     AppendEnvVars:     nil,<br>  }<br> }<br>  return depDriver, nil<br>}</pre><h4>Containers and Docker Images</h4><p>The Containers map and Container struct let you define the container specifics, like whether it&#39;s an init container, the image pull policy, and the Docker image details. The DockerImage struct further allows you to specify the image name, commands, arguments, and resources, as well as environment variables, ports, and volume mounts.</p><pre>func BuildContainerDriver(ctx context.Context, name string, container Container) (v1.Container, error) {<br> pp := &quot;IfNotPresent&quot;<br> if len(container.ImagePullPolicy) &gt; 0 {<br>    pp = container.ImagePullPolicy<br> }<br> c := v1.Container{<br>    Name:            name,<br>    Image:           container.DockerImage.ImageName,<br>    ImagePullPolicy: v1.PullPolicy(pp),<br>    Command:         strings.Split(container.DockerImage.Cmd, &quot;,&quot;),<br>    Args:            strings.Split(container.DockerImage.Args, &quot;,&quot;),<br>    Ports:           []v1.ContainerPort{},<br>    EnvFrom:         nil,<br>    Env:             []v1.EnvVar{},<br>    Resources: v1.ResourceRequirements{<br>     Limits:   make(map[v1.ResourceName]resource.Quantity),<br>     Requests: make(map[v1.ResourceName]resource.Quantity),<br>    },<br>    VolumeMounts: []v1.VolumeMount{},<br> }</pre><pre> for _, ev := range container.DockerImage.EnvVars {<br>    c.Env = append(c.Env, v1.EnvVar{Name: ev.Name, Value: ev.Value})<br> }</pre><pre> for _, p := range container.DockerImage.Ports {<br>  if len(p.Name) &lt;= 0 || len(p.Number) &lt;= 0 {<br>     continue<br>  }</pre><pre>  if p.ProbeSettings.UseForReadinessProbe &amp;&amp; p.Name != &quot;&quot; {<br>     rp := &amp;v1.Probe{<br>      ProbeHandler: v1.ProbeHandler{<br>       TCPSocket: &amp;v1.TCPSocketAction{<br>        Port: intstr.IntOrString{<br>         Type:   intstr.String,<br>         StrVal: p.Name,<br>        },<br>       },<br>      },<br>      InitialDelaySeconds: 60,<br>      PeriodSeconds:       10,<br>     }<br>     c.ReadinessProbe = rp<br>  }<br>  if p.ProbeSettings.UseForLivenessProbe &amp;&amp; p.Name != &quot;&quot; {<br>     rp := &amp;v1.Probe{<br>      ProbeHandler: v1.ProbeHandler{<br>       TCPSocket: &amp;v1.TCPSocketAction{<br>        Port: intstr.IntOrString{<br>         Type:   intstr.String,<br>         StrVal: p.Name,<br>        },<br>       },<br>      },<br>      InitialDelaySeconds: 60,<br>      PeriodSeconds:       30,<br>     }<br>     c.LivenessProbe = rp<br>  }<br>  // Use strconv.ParseInt to convert the string to int64<br>  numberInt64, err := strconv.ParseInt(p.Number, 10, 32)<br>  if err != nil {<br>     log.Error().Err(err).Msg(&quot;failed to parse port number&quot;)<br>   return c, err<br>  }<br>  c.Ports = append(c.Ports, v1.ContainerPort{<br>     Name:          p.Name,<br>     ContainerPort: int32(numberInt64),<br>     Protocol:      v1.Protocol(p.Protocol),<br>  })<br> }</pre><pre> for _, v := range container.DockerImage.VolumeMounts {<br>  if len(v.Name) &gt; 0 &amp;&amp; len(v.MountPath) &gt; 0 {<br>   c.VolumeMounts = append(c.VolumeMounts, v1.VolumeMount{<br>      Name:      v.Name,<br>      MountPath: v.MountPath,<br>   })<br>  }<br> }<br> if len(container.DockerImage.ResourceRequirements.CPU) &gt; 0 {<br>    c.Resources.Requests[&quot;cpu&quot;] = resource.MustParse(container.DockerImage.ResourceRequirements.CPU)<br>    c.Resources.Limits[&quot;cpu&quot;] = resource.MustParse(container.DockerImage.ResourceRequirements.CPU)<br> }<br> if len(container.DockerImage.ResourceRequirements.Memory) &gt; 0 {<br>    c.Resources.Requests[&quot;memory&quot;] = resource.MustParse(container.DockerImage.ResourceRequirements.Memory)<br>    c.Resources.Limits[&quot;memory&quot;] = resource.MustParse(container.DockerImage.ResourceRequirements.Memory)<br> }<br> return c, nil<br>}</pre><h3>Now you’ll see your workload in your generated config directory</h3><ul><li>deployment.yaml</li><li>service.yaml</li><li>ingress.yaml</li></ul><h3>Server Provisioning &amp; Deploying Your zK8s App</h3><p>Then find your zK8s cluster application on the Apps page. Select a server and press Deploy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/724/1*B6TFdEz6dE9ZExv5ggMtNw.png" /><figcaption>Find this on our Apps page, then click the docusaurus-template app</figcaption></figure><p>After deployment, you’ll shortly see your newly provisioned server show up under the cluster resources tab.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ny4kQtiVSuVo6vOviUTwUQ.png" /><figcaption>Find this on the Compute-&gt;Provisioned Tab on our UI</figcaption></figure><p>You can easily find your cluster’s cloud, namespace, and context in the App View, clicking on the relevant row will take you to the DevOps dashboard.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5I2J1RviHvK4x4mcv3102Q.png" /></figure><h3>DevOps Dashboard</h3><p>You can also check the logs to see if any errors have occurred, or delete the pod, rollout a restart, or update the infra config.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*j3ldrAGHcvn0s4D3brxGKg.png" /></figure><h3>Back to the code</h3><h4>Streamlined Deployment Creation</h4><p>The code snippet provided illustrates how minimal parameters can be used to create a comprehensive Kubernetes deployment for Docusaurus. It includes resource requirements, port configurations, and probe settings necessary for a live and ready service.</p><pre>// This is your packaged zK8s cluster application definition.<br>type Cluster struct {<br>   ClusterName     string                                `json:&quot;clusterName&quot;`<br>   ComponentBases  ComponentBases                        `json:&quot;componentBases&quot;`<br>   IngressSettings zk8s_templates.Ingress                `json:&quot;ingressSettings&quot;`<br>   IngressPaths    map[string]zk8s_templates.IngressPath `json:&quot;ingressPaths&quot;`<br>   FilePath        filepaths.Path                        `json:&quot;-&quot;`<br>}</pre><pre>func GenerateDeploymentCluster(ctx context.Context, wd WorkloadDefinition)<br>   (*Cluster, error) {<br>   componentBases := map[string]SkeletonBases{<br>       wd.WorkloadName: {<br>       wd.WorkloadName: SkeletonBase{<br>          Containers:    wd.Containers,<br>          AddDeployment: true,<br>          Deployment: zk8s_templates.Deployment{<br>            ReplicaCount: wd.ReplicaCount,<br>          },<br>          AddIngress: true,<br>          AddService: true,<br>         },<br>      },<br>   }<br>   c := &amp;Cluster{<br>    ClusterName:    wd.WorkloadName,<br>    IngressPaths:   map[string]zk8s_templates.IngressPath{},<br>    ComponentBases: componentBases,<br>    FilePath:       wd.FilePath,<br>   }<br>   return c, nil<br>}</pre><h4>Previewing Generated Configs</h4><p>This function takes your workload definition generated zK8s cluster and builds Kubernetes configs using it. See more details in zeus/cluster_config_drivers</p><pre>func PreviewTemplateGeneration(ctx context.Context, cluster *Cluster) (ClusterDefinition, error) {<br> templateClusterDefinition := ClusterDefinition{<br>  ClusterClassName:    cluster.ClusterName,<br>  ComponentBases:      make(map[string]ComponentBaseDefinition),<br>  UseEmbeddedWorkload: true,<br> }<br> for cbName, componentBase := range cluster.ComponentBases {<br>  cbDef := ComponentBaseDefinition{<br>   SkeletonBases: make(map[string]ClusterSkeletonBaseDefinition),<br>  }<br>  for sbName, skeletonBase := range componentBase {<br>   sbDef := ClusterSkeletonBaseDefinition{<br>    SkeletonBaseChart:         zeus_req_types.TopologyCreateRequest{},<br>    Workload:                  topology_workloads.TopologyBaseInfraWorkload{},<br>    SkeletonBaseNameChartPath: cluster.FilePath,<br>    TopologyConfigDriver:      &amp;zeus_topology_config_drivers.TopologyConfigDriver{},<br>   }<br>   if skeletonBase.AddStatefulSet {<br>    sbDef.Workload.StatefulSet = zk8s_templates.GetStatefulSetTemplate(ctx, cbName)<br>    stsDriver, err := zk8s_templates.BuildStatefulSetDriver(ctx, skeletonBase.Containers, skeletonBase.StatefulSet)<br>    if err != nil {<br>       return templateClusterDefinition, err<br>    }<br>    sbDef.TopologyConfigDriver.StatefulSetDriver = &amp;stsDriver<br>   } else if skeletonBase.AddDeployment {<br>    sbDef.Workload.Deployment = zk8s_templates.GetDeploymentTemplate(ctx, cbName)<br>    depDriver, err := zk8s_templates.BuildDeploymentDriver(ctx, skeletonBase.Containers, skeletonBase.Deployment)<br>    if err != nil {<br>       return templateClusterDefinition, err<br>    }<br>    sbDef.TopologyConfigDriver.DeploymentDriver = &amp;depDriver<br>   }<br>   if skeletonBase.AddIngress {<br>    sbDef.Workload.Ingress = zk8s_templates.GetIngressTemplate(ctx, cbName)<br>    ingDriver, err := zk8s_templates.BuildIngressDriver(ctx, cbName, skeletonBase.Containers, cluster.IngressSettings, cluster.IngressPaths)<br>    if err != nil {<br>       return templateClusterDefinition, err<br>    }<br>    sbDef.TopologyConfigDriver.IngressDriver = &amp;ingDriver<br>   }<br>   if skeletonBase.AddService {<br>    sbDef.Workload.Service = zk8s_templates.GetServiceTemplate(ctx, cbName)<br>    svcDriver, err := zk8s_templates.BuildServiceDriver(ctx, skeletonBase.Containers)<br>    if err != nil {<br>     return templateClusterDefinition, err<br>    }<br>    sbDef.TopologyConfigDriver.ServiceDriver = &amp;svcDriver<br>   }<br>   if skeletonBase.AddConfigMap {<br>    sbDef.Workload.ConfigMap = zk8s_templates.GetConfigMapTemplate(ctx, cbName)<br>    cmDriver, err := zk8s_templates.BuildConfigMapDriver(ctx, skeletonBase.ConfigMap)<br>    if err != nil {<br>       return templateClusterDefinition, err<br>    }<br>    sbDef.TopologyConfigDriver.ConfigMapDriver = &amp;cmDriver<br>   }<br>   cbDef.SkeletonBases[sbName] = sbDef<br>  }<br>  templateClusterDefinition.ComponentBases[cbName] = cbDef<br> }<br> return templateClusterDefinition, nil<br>}</pre><h4>Hosting Docusaurus with zK8s</h4><p>Deploying Docusaurus is dead simple with zK8s. The dockerImage parameter takes a Docusaurus Docker image, and with the GenerateDeploymentCluster function, we then add the ingress path and type to the zK8s cluster definition, and it generates a deployment workload contextually aware of your settings.</p><pre>cd, err := zeus_cluster_config_drivers.GenerateDeploymentCluster(ctx, wd)</pre><pre> // Add ingress<br> cd.IngressPaths = map[string]zk8s_templates.IngressPath{<br>  wd.WorkloadName: {<br>   Path:     &quot;/&quot;,<br>   PathType: &quot;ImplementationSpecific&quot;,<br>  },<br> }</pre><h4>Real-World Application</h4><p>Our tool has been put to the test with the real-world deployment of https://docusaurus-template-19d93295.zeus.fyi. By default, the website is hosted at namespace.zeus.fyi, showcasing the simplicity and power of zK8s in action.</p><p><a href="https://docusaurus-template-19d93295.zeus.fyi/">Hello from My Site | My Site</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*37QUAh05zqDW5rCJ5AvPpw.png" /></figure><h3>Conclusion</h3><p>zK8s is a robust tool that simplifies Kubernetes development by encapsulating complex configurations into easily understandable Go code. Unlocking highly repeatable and easily testable infra configuration. It ensures faster deployment, reduces the possibility of human error, and makes unit testing a core part of the development process. Try zK8s for your next Kubernetes project, and experience the simplicity of hosting services like Docusaurus in just 5 minutes.</p><h3>Want to become an expert on any of these topics?</h3><p>Postgres<br>Redis<br>Kafka<br>Microservices<br>Kubernetes<br>System Design<br>Cloud Infra</p><p>…and more</p><p>We’ll send out workshop and webinar signup forms via our newsletter, as well as discount codes.</p><p>INFO: <a href="https://linktr.ee/zeusfyi"><strong>https://linktr.ee/zeusfyi</strong></a></p><h3>About Us</h3><p>The Cloud Platform for Microservices &amp; SOA Development. Zeusfyi orchestrates cloud infrastructure provisioning, app deployment, and configuration and unifies multi-cloud, multi-cluster Kubernetes environments so your microservices and x-org teams can run on autopilot.</p><h3>Want to jump start your own docs site? We have every step covered. Find more on our GitHub repo.</h3><h4>Dockerfile</h4><pre>#syntax=docker/dockerfile:1.4<br>FROM node:lts as base</pre><pre>WORKDIR /app</pre><pre>ARG DIR<br># Copy the package.json and package-lock.json files into the container<br>COPY apps/docusaurus/template/package.json apps/docusaurus/template/yarn.lock ./</pre><pre># Install any needed packages<br>RUN yarn install --frozen-lockfile</pre><pre># Copy the rest of the application code into the container<br>COPY apps/docusaurus/template/ ./</pre><pre># Build the React app for production<br>RUN yarn run build</pre><pre>ENV NODE_ENV=production</pre><pre>EXPOSE 3000</pre><pre>CMD [&quot;yarn&quot;, &quot;run&quot;, &quot;serve&quot;, &quot;--host&quot;, &quot;0.0.0.0&quot;]</pre><h4>GitHub Actions CI/CD</h4><pre>name: Build Docusaurus Template Site</pre><pre>on:<br>  push:<br>    paths:<br>      - .github/workflows/docusaurus.yml<br>      - apps/docusaurus/template/**<br>    branches:<br>      - main</pre><pre>permissions:<br>  contents: read<br>  id-token: write</pre><pre>env:<br>  REPO: zeusfyi<br>  NAME: docusaurus-template<br>  TAG: latest<br>  GOOS: linux<br>  GOARCH: amd64</pre><pre>jobs:<br>  build:<br>    runs-on: ubuntu-22.04<br>    steps:<br>      - name: Checkout code<br>        uses: actions/checkout@v2</pre><pre>      - name: Set up Depot CLI<br>        uses: depot/setup-action@v1</pre><pre>      - name: Login to Docker Registry<br>        run: docker login -u zeusfyi -p ${{ secrets.DOCKER_ACCESS_TOKEN }}</pre><pre>      - name: Build And Publish Zeusfyi Docs Site<br>        run: |<br>          depot build \<br>          -t ${{ env.REPO }}/${{ env.NAME }}:${{ env.TAG}} \<br>          --platform=${{ env.GOOS }}/${{ env.GOARCH }} \<br>          --token ${{ secrets.DEPOT_TOKEN }} \<br>          --provenance=false \<br>          -f docker/docusaurus_template/Dockerfile . --push</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2ffcf7d82887" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[High Performance Disks: NVMe in the Cloud]]></title>
            <link>https://medium.com/@alexgeorge_18841/high-performance-disks-nvme-in-the-cloud-dc8bda9ea1b5?source=rss-843f4582c6d8------2</link>
            <guid isPermaLink="false">https://medium.com/p/dc8bda9ea1b5</guid>
            <dc:creator><![CDATA[Alex George]]></dc:creator>
            <pubDate>Wed, 15 Jan 2025 20:41:42 GMT</pubDate>
            <atom:updated>2025-01-15T20:41:42.277Z</atom:updated>
            <content:encoded><![CDATA[<h4>How to use NVMe disks the right way before you spend $$$$</h4><p>The technological world is rife with acronyms, and in the realm of storage solutions, few have made as significant an impact as NVMe. If you’re looking to understand the future of data storage in the cloud it’s crucial to get acquainted with NVMe and its role in optimizing cloud performance.</p><h4>What is NVMe?</h4><p>NVMe, or Non-Volatile Memory Express, is a protocol designed for high-speed interface between the CPU and the SSD. It’s designed to capitalize on the potential of solid-state drives, offering faster read and write capabilities compared to traditional storage protocols.</p><p>Embracing advanced cloud technology, especially NVMe-based storage solutions, presents numerous advantages:</p><ol><li><strong>Speed</strong>: With significantly faster read/write capabilities, applications run more efficiently, leading to better user experiences.</li><li><strong>Scalability</strong>: These technologies scale seamlessly to accommodate growth, ensuring that businesses can handle increased demand without massive infrastructural changes.</li><li><strong>Cost-Efficiency</strong>: Over the long run, advanced cloud technology can lead to cost savings, as better performance can mean fewer resources used.</li></ol><h4>TLDR</h4><p>NVMe backed disks are able to process around 3–10x as much data as traditional SSD packed storage but are only slightly more expensive than traditional SSD options. <strong>In disk i/o bottlenecked applications commonly found in Big Data, ML, and Web3 Cloud, switching to NVMe could mean you need less servers to handle the same traffic, which would lead to a substantial cost savings.</strong></p><h4>So why isn’t everyone using this?</h4><p>NVMe disks work best as locally attached to the server and often require you formatting the disks properly before you can use them. Block storage options such as EBS are much more readily available and are well understood by most cloud engineers.</p><h4>It’s hard that’s why</h4><h3>I want to use NVMe disks anyway, what now?</h3><p>Let’s review what factors you need to consider as an engineer when doing system design for disks</p><h4>Disk Metrics for Data Processing Capability</h4><h4>What is IOPS?</h4><p>IOPS stands for Input/Output Operations Per Second. It measures the number of read and write operations a storage device can handle in one second. Higher IOPS generally translates to better overall storage performance.</p><h4>What is Throughput?</h4><p>Throughput is the rate at which data can be read from or written to a storage device. It’s typically measured in megabytes per second (MB/s) or gigabytes per second (GB/s).</p><h4>How is IOPS related to Throughput?</h4><p>In essence, while IOPS measures the frequency of data transactions, Throughput evaluates the volume of these transactions. Both metrics are crucial: IOPS indicates transactional performance (ideal for databases), whereas Throughput is key for tasks involving large data transfers, like streaming. Together, they offer a comprehensive insight into a storage device’s overall performance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*TFB-QrKxAXTaqxAh.jpg" /><figcaption>Source: <a href="https://www.atpinc.com/blog/nvme-vs-sata-ssd-pcie-interface">https://www.atpinc.com/blog/nvme-vs-sata-ssd-pcie-interface</a></figcaption></figure><h4>What do I need to grep from this?</h4><p>IOPS or throughput metrics alone are basically useless. Once you have them both though, you can find the right solution for your application.</p><h4>I need to understand even more?</h4><p>Absolutely, that was the easy part. Let’s explain the less well understood parts</p><h4>What is Disk Seek Latency?</h4><p>Disk seek latency refers to the time it takes for a storage device to locate and access a specific piece of data. This becomes a significant metric when you are using networked storage.</p><h4>Block Storage such as EBS is Networked Storage</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/719/0*35lxuf-YMLsp8ZjQ.jpg" /><figcaption>Source: <a href="https://www.geeksforgeeks.org/packet-flow-in-different-network/">https://www.geeksforgeeks.org/packet-flow-in-different-network/</a></figcaption></figure><p>Block storage is typically housed in networked storage systems, separate from the main computing resources. So, when a data request is made latency is not just about reading from the disk.</p><blockquote>The request travels over the network to the block storage system, the specific block is identified, and the data is then sent back across the network to the requesting system.</blockquote><p>This networked architecture, while offering scalability and flexibility, introduces considerations of network latency and potential variability in data access times.</p><h4>What Impacts Networked Storage Latency Performance?</h4><blockquote>It’s the size of the data. Intuitively, larger operations take more time because of the sheer volume of data that must be transported over the network and subsequently processed by the storage service.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/773/0*EPN-NHfcUmKZQT_P.png" /><figcaption>Source: <a href="https://learn.microsoft.com/en-us/azure/storage/blobs/storage-blobs-latency">https://learn.microsoft.com/en-us/azure/storage/blobs/storage-blobs-latency</a></figcaption></figure><p>Consider a hypothetical graph mapping total operational time against varying operation sizes:</p><ol><li>Small Data Operations: For minimal data quantities, most of the latency is consumed by managing the request, not the data transfer. Even with slight increases in data size, latency sees only a marginal rise (Area 1 on the graph).</li><li>Moderate Data Operations: As the data volume grows, latency starts to distribute between request management and data transmission (Area 2 on the graph).</li><li>Large Data Operations: For substantial data operations, the lion’s share of the latency is dedicated to data transfer, making request management time almost negligible (Area 3 on the graph).</li></ol><p>The communication link between the client and the storage service, especially in terms of network interface and bandwidth, also holds significant weight. Other elements like <strong>network hops, noisy neighbors, service provider routing, and general internet conditions further complicate the latency equation.</strong></p><h4>That’s all right?</h4><p>Nope, let’s keep going.</p><h4>I want to use NVMe disks, but even the server type matters?</h4><p>That’s right. Each cloud provider has different supported configurations for NVMe disks. In all of them, the server you use matters. In some cases it changes the performance, in others you can’t even use NVMe. So selecting the correct server is important.</p><h4>AWS NVMe</h4><blockquote>For instance types with <strong>NVMe instance store volumes</strong>, all of the supported instance store volumes are automatically attached to the instance at launch. For instance types with <strong>non-NVMe instance store volumes</strong>, such as C1, C3, M1, M2, M3, R3, D2, H1, I2, G2, X1, and X1e, you must manually specify the block device mappings for the instance store volumes that you want to attach at launch.</blockquote><blockquote>source: <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-store-volumes.html">https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-store-volumes.html</a></blockquote><h4>Ok but what about GCP?</h4><p>They give you the option to provision a machine dependent number of 375 GB disks onto select NVMe compatible machines, which you can then string together format into a RAID config like on AWS. <strong><em>Easy</em> right?</strong></p><figure><img alt="Using google machines in GKE" src="https://cdn-images-1.medium.com/max/889/1*5zVxBtlYfGw-Qmp-ilsexg.png" /><figcaption>Source: <a href="https://cloud.google.com/kubernetes-engine/docs/how-to/persistent-volumes/local-ssd">https://cloud.google.com/kubernetes-engine/docs/how-to/persistent-volumes/local-ssd</a></figcaption></figure><h4>That’s all now I hope..?</h4><p>Not quite however most of the additional complication now is closer to the application, kernel, and hardware level which is out of scope for this article.</p><p>The most pressing factor now to consider is the tradeoffs you’ll need to make. Here’s some additional topics to explore though if you want to learn more</p><p>Other Factors Affecting Performance:</p><ul><li>Network Egress: Data transfer rates between the VM and external services can influence performance.</li><li>Read/Write: Disk performance is also impacted by read vs write and whether it is a sequential vs random read write</li><li>Logical Volume Size: Larger volumes might offer better performance but can be more challenging to manage.</li><li>Multiple Disks Attached to a Single VM Instance: This can cause I/O contention.</li><li>Low I/O Queue Depth: Refers to the number of pending I/O requests. A low queue depth can result in reduced performance.</li><li>If you choose to use NVMe, you must use a special NVMe-enabled OS image to achieve the best performance</li></ul><h3>System Design Trade Offs</h3><p>To get the max performance of NVMe backed disks <strong>you should be using locally attached disks in most cases</strong>. However, now you at least have a starting point for figuring out whether that is relevant for your application. In Kubernetes, that means you’ll be using a local volume provisioner to setup locally attached storage configuration.</p><h4>Local Disk Storage</h4><p><em>Pros:</em></p><ul><li>Highest possible performance. Significantly faster data access.</li><li>Directly attached to the VM, ensuring low latency.</li><li>Easier to manage security</li></ul><p><em>Cons:</em></p><ul><li>Data is lost if the VM is terminated.</li><li>Not suitable for long-term, persistent storage needs, without backup mitigation</li><li>Not easy to resize</li><li>Much harder to configure due to cloud provider, server, OS variations</li></ul><h4>Block Storage</h4><p><em>Pros:</em></p><ul><li>No need for multiple storage devices for servers, leading to easier operations, reduced costs, and enhanced protection.</li><li>Most cloud providers offer some level of data persistence guarantee</li><li>Allows you to easily resize disks</li><li>Offers more dynamic options for IOPS/Throughput</li></ul><p>Cons:</p><ul><li>Noisy neighbors can impact performance</li><li>Network latency</li></ul><h4>Introducing zK8s our Unified Cloud Kubernetes Service</h4><p>We already setup the automation necessary to configure NVMe disks on demand for maximum performance as locally attached devices. Using them is as simple as specifying the storage class name and launching a server that supports NVMe disks.</p><p>Additionally, you can search for NVMe supported machines across cloud providers via our unified cloud server API or on our cloud platform UI, which also lets you filter servers by provider, RAM, CPU, GPU, and more.</p><p>We developed the first locally attached provisioner for DigitalOcean and open sourced the code to setup your own Kubernetes clusters on GCP, DigitalOcean, and AWS.</p><blockquote><a href="https://github.com/zeus-fyi/zeus/tree/main/zeus/cluster_resources/nvme">zeus/cluster_resources/nvme</a></blockquote><p>Want to see examples? Check out our recent cookbook addition for setting up a Sui node, which includes NVMe configurations per cloud provider.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R7jzH4CIJw2VI_Spnyonyg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VfGDYAex71DGrvAdvSyGfw.png" /></figure><pre>volumeClaimTemplates:<br>    - metadata:<br>        name: sui-client-storage<br>        creationTimestamp: null<br>      spec:<br>        accessModes:<br>          - ReadWriteOnce<br>        resources:<br>          requests:<br>            storage: 4Ti<br>        storageClassName: fast-disks<br>      status: {}<br>  serviceName: sui<br>  podManagementPolicy: OrderedReady<br>  updateStrategy:<br>    type: RollingUpdate</pre><h4>Need help with building your NVMe backed solution?</h4><p>We’ve got you covered. Connect with our solutions engineering team and we’ll help you design the system you need, and it’s completely free to use. So what are you waiting for?</p><p>What’s next? A follow-up article more specific to configuring Kubernetes to use local SSDs and NVMe backed disks.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dc8bda9ea1b5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Show Me the Stats]]></title>
            <link>https://medium.com/@alexgeorge_18841/show-me-the-stats-b985220faa24?source=rss-843f4582c6d8------2</link>
            <guid isPermaLink="false">https://medium.com/p/b985220faa24</guid>
            <dc:creator><![CDATA[Alex George]]></dc:creator>
            <pubDate>Wed, 15 Jan 2025 20:39:57 GMT</pubDate>
            <atom:updated>2025-01-15T20:39:57.360Z</atom:updated>
            <content:encoded><![CDATA[<h4>Optimal adaptive load balancing in stochastic environments</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/561/0*MIohcMwMmhSv2-AB.png" /><figcaption>Control Loop Diagram</figcaption></figure><h4>Introduction</h4><p>In today’s fast-paced digital landscape where distributed systems are increasingly the norm, the efficiency of managing requests to systems and servers is more crucial than ever. At the heart of this efficiency lies the art and science of load balancing — the process of distributing incoming network traffic across multiple servers to ensure optimal resource utilization, maximize throughput, and minimize response time.</p><p>This article introduces our groundbreaking adaptive load balancer on a more technical level. We’ll cover design decisions, tradeoffs, assumptions, and most importantly<strong> actual results that are easy to understand, reproduce, and accurately mirror real world observed performance gains.</strong></p><h4>Load Balancing: A Brief Primer</h4><p>Load balancing is the technique of distributing incoming network traffic across multiple servers, ensuring efficient resource utilization and optimal response times. This practice can be broadly categorized into two methods:</p><p>1. Static Load Balancing: In this method, traffic distribution rules are predefined and don’t rely on the current state or performance of servers.</p><ul><li>Round-robin: Alternates between servers in a cyclical manner.</li><li>Weighted Round-robin: Considers pre-set priorities or capacities for each server.</li><li>IP Hash: Determines server selection based on a mathematical representation of a client’s IP address.</li></ul><p>2. Dynamic Load Balancing: Here, server performance and current conditions play a pivotal role in decision-making.</p><ul><li>Least Connection: Sends traffic to servers with minimal active connections.</li><li>Weighted Least Connection: Weighs servers based on their capacity and adjusts traffic distribution accordingly.</li><li>Least Response Time: Balances load based on a server’s responsiveness and connection count.</li><li>Resource-based: Examines the actual resource utilization of servers, like CPU and memory, before directing traffic.</li></ul><h4>Background and Challenges of Traditional Load Balancing</h4><p>In a world where workloads are not always uniform the one-size-fits-all nature of round robin can lead to inefficiencies, resource underutilization, and even system bottlenecks. Yet, previous dynamic load balancing strategies have failed to consistently outperform simpler approaches in practice because they end up being too time consuming to implement, too complex to understand, or overly fit on an application specific metric instead of being tunable &amp; truly general purpose and consistently better than anything else using only default settings. <strong>A key reason being, they don’t function like true control loops over metrics that correlate most strongly with performance.</strong></p><p>How does this impact real world businesses<strong>? Less responsive websites, lost business from failed API requests, higher costs from traffic bandwidth, hitting rate limits more often, leading to more on-call pages from broken systems. </strong>These common real world scenarios highlight an urgent need for a more intelligent and adaptive solution.</p><h4>The Ideal Adaptive Algorithm</h4><p>In our view, an ideal adaptive algorithm meets these design objectives</p><ol><li>Mathematically provably better than other load balancing approaches using only default settings</li><li>General purpose, works in the context of web3 nodes, works for e-commerce, works for cloud computing.</li><li>Fast, must have &lt;1ms of processing time. Lightweight stat tables &lt;1kb.</li><li>Tunable enough to cover 99% of applications, with the minimum knobs necessary. We think 3 is sufficient (latency, error, decay).</li><li>Easy to simulate results, and models accurately match real results.</li></ol><h4>Design Principles &amp; Assumptions</h4><p>We based our solution on how <a href="https://en.wikipedia.org/wiki/Multi-armed_bandit">multi-armed bandit</a> problems are solved, eg reinforcement based learning in environments with variable rewards that are statistically optimizable in aggregate.</p><ol><li>Data in this context is most valuable the moment it’s generated and then rapidly decays in useful value.</li><li>No assumptions are made about the system in advance, it should learn from the environment via a control loop. It should make the best decision it can given the data that exists locally, but there is an element of randomness. Eg. stochastic environment.</li><li>In perfect conditions (no errors, no endpoint latency deviation), it should perform identically to round robin. The further from ideal, meaning the more errors, higher latency skew among endpoints, the better the improvement.</li><li>Should never get “stuck”, eg permanently exclude endpoints.</li></ol><h4>Results</h4><p>Through iterative numerical analysis we deduced these default scale factors. Here are the parameters we used in our simulations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/604/1*iOlHXWL5z1Dvl0J9wb5kUw.png" /><figcaption>These are the default scale factor settings (latency, error, decay)</figcaption></figure><p>We show how these perform well in a few easy to understand A|B comparisons to our Round Robin control group.</p><h4>Round Robin Control Group Error Rates</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/708/1*cHTLJ70oUhcDRxCK3X6fPg.png" /><figcaption>Round Robin (0–1%-10%) error rates</figcaption></figure><h4>Adaptive Error Rate Reduction</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/758/1*okoQs8hIiG6aD1UKBST79Q.png" /><figcaption>Adaptive (0–1%-10%) Significant Error Rate Reduction over Round Robin</figcaption></figure><p>Here we demonstrate that <strong>only a 10% error rate difference yields a nearly 50% error rate reduction over the Round Robin approach</strong>. We also prove our design goal of mirroring Round Robin when there’s no difference between endpoints with respect to latency or error rates.</p><h4>Round Robin Control Group Latency</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/713/1*iY3BR33XyrFJgNyAA_2Zvw.png" /><figcaption>Round Robin (1–5–10% latency skew)</figcaption></figure><h4>Adaptive Latency Reductions</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/699/1*RKJ0UktObSizpCEdNq024Q.png" /><figcaption>Adaptive (1–5–10% latency skew)</figcaption></figure><p>API endpoints are rarely identical in performance in distributed systems, 10% latency skews or greater commonly occur, sometimes in the short term, sometimes consistently long term. Here we demonstrate that our adaptive algorithm improves performance in proportion to how much variance exists over all such cases.</p><h4>How can I repeat these results? How can I predict the impact of tuning scale factors?</h4><p>We’re sharing this python script which we used to model simulations so you can copy, paste, and replicate our results or tune your own workloads. Use an online IDE such as <a href="https://www.boot.dev/playground/py">https://www.boot.dev/playground/py</a> and you can start experimenting right away. Try changing the random distribution function, injecting more routes to see how it performs across more dynamic environments.</p><pre>import random</pre><pre>num_simulations = 1000<br>num_requests = 1000</pre><pre>latency_scale_factor = 0.6<br>decay_scale_factor = 0.95<br>error_scale_factor = 3<br>table_routes_count = 2</pre><pre>route_a_error_rate = 0.01<br>route_b_error_rate = 0.01<br></pre><pre>def random_latency_percentile():<br>    return random.uniform(0, 1)<br></pre><pre>def simulate(num_simulations=1000, num_requests=1000):<br>    results_a = []<br>    results_b = []</pre><pre>    for _ in range(num_simulations):<br>        score_a, score_b = 1.0, 1.0<br>        requests_a, requests_b = 0, 0</pre><pre>        for _ in range(num_requests):<br>            if score_a &lt; score_b:<br>                selected_endpoint = &quot;A&quot;<br>            else:<br>                selected_endpoint = &quot;B&quot;</pre><pre>            latency = random_latency_percentile()</pre><pre>            if selected_endpoint == &quot;A&quot;:<br>                score_a *= (latency + latency_scale_factor)<br>                if random.random() &lt; route_a_error_rate:<br>                    score_a *= error_scale_factor<br>                requests_a += 1<br>                if requests_a % table_routes_count == 0:<br>                    score_a *= decay_scale_factor<br>            else:<br>                score_b *= (latency + latency_scale_factor)<br>                if random.random() &lt; route_b_error_rate:<br>                    score_b *= error_scale_factor<br>                requests_b += 1<br>                if requests_b % table_routes_count == 0:<br>                    score_b *= decay_scale_factor</pre><pre>        results_a.append(requests_a)<br>        results_b.append(requests_b)</pre><pre>    # Calculate average and other statistics if needed<br>    avg_a = sum(results_a) / num_simulations<br>    avg_b = sum(results_b) / num_simulations</pre><pre>    return avg_a, avg_b<br></pre><pre># After all simulations, you can calculate statistics on results_a and results_b<br>print(simulate())</pre><h4>Bottom Line</h4><p>What would 50% less errors mean for your application? How tolerant are your users to latency? If they have meaningful impacts you should strongly consider using our adaptive approach to load balancing.</p><h4>What’s Next?</h4><p>In an upcoming article we’ll overview how we proved these simulations matched real world api usage, explain the tools we used and created for testing and show methods &amp; results.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b985220faa24" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Yaml, Yet Another Mega Letdown. We Can Use Kubernetes a Better Way.]]></title>
            <link>https://medium.com/@alexgeorge_18841/yaml-yet-another-mega-letdown-we-can-use-kubernetes-a-better-way-5c644f75c147?source=rss-843f4582c6d8------2</link>
            <guid isPermaLink="false">https://medium.com/p/5c644f75c147</guid>
            <category><![CDATA[yaml]]></category>
            <category><![CDATA[gitops]]></category>
            <category><![CDATA[infrastructure-as-code]]></category>
            <category><![CDATA[infrastructure]]></category>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[Alex George]]></dc:creator>
            <pubDate>Fri, 11 Nov 2022 04:24:16 GMT</pubDate>
            <atom:updated>2022-11-11T04:24:16.203Z</atom:updated>
            <content:encoded><![CDATA[<p>YAML may be one of the worst languages of all time, yet that’s how most of web2 &amp; web3 infra is created and managed. It’s like having an architect design a bridge, but then give all the instructions to the engineers who build and maintain it in ancient greek. It’s extremely difficult to make sense of the complex white spaces it requires, it’s not type safe, has horrible conditional logic and func options, constantly causes hidden data type conversions like numbers to scientific notation, and has unstructured and ambiguous settings.</p><p>Why would anyone want to write programs that literally hold billions of dollars in crypto on anything like that?</p><p>One attempt to address this was GitOps like FluxCD &amp; ArgoCD, but GitOps is seriously flawed. It completely does not handle scale, or complex and dynamic infrastructure, let alone make it much easier to manage an enterprise level infrastructure setup.</p><p>I think there’s a much better way.</p><p>It starts with converting Kubernetes YAML into database models, and storing them there, where you gain all the benefits of relational data, and gain SQL querying ability. Additionally you then can deploy them via API using orchestration, where they can reliably deploy, destroy, update, whenever, wherever. Where config changes are easy, mapping infrastructure to users, is easy, changing infra on demand is easy, testing distributed systems and building them is easy, and where your engineering headcount is much lower, and cloud infra costs much lower.</p><p>In this world, you can go from a dockerized app -&gt; deployed &amp; managed on kubernetes in 30s or less, as a solo developer, startup, or enterprise sized user. That sounds less like Greek to me.</p><p>If that resonates with you, check out this Github page where you can sign up for a demo and learn more.</p><p><a href="https://github.com/zeus-fyi/zeus">https://github.com/zeus-fyi/zeus</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5c644f75c147" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introducing mopayd, a mobile payments company powered by stablecoins on the Ethereum network]]></title>
            <link>https://medium.com/mopayd/introducing-mopayd-a-mobile-payments-company-powered-by-stablecoins-on-the-ethereum-network-15f78b2fd8d5?source=rss-843f4582c6d8------2</link>
            <guid isPermaLink="false">https://medium.com/p/15f78b2fd8d5</guid>
            <category><![CDATA[payments]]></category>
            <category><![CDATA[fintech]]></category>
            <category><![CDATA[banking]]></category>
            <category><![CDATA[mobile-apps]]></category>
            <category><![CDATA[blockchain]]></category>
            <dc:creator><![CDATA[Alex George]]></dc:creator>
            <pubDate>Mon, 09 Sep 2019 16:33:38 GMT</pubDate>
            <atom:updated>2019-10-19T22:28:40.531Z</atom:updated>
            <content:encoded><![CDATA[<p>TLDR;</p><p>App allows users to instantly send and receive stablecoin payments, enabling stablecoins to be used in a much larger range of applications like point-of-sale. Additionally, it makes it easy to search for and pay by username as well as track payment receipts by customer.</p><h3>The benefits of mobile money to consumers</h3><p>It is widely accepted that mobile payments yield substantial benefits to consumers, not least because of the ability of these payment mechanisms to offer a secure, cheaper and more convenient method for people, particularly in poor or rural settings, to send and receive money (Klein &amp; Mayer, 2011). This includes the ability to bring people that were previously not catered for under traditional payment systems into more formal systems of transacting. This contributes substantially to increasing financial inclusion. A key component driving the penetration of mobile money and electronic payments in general, across several countries, is the ability of these platforms to disaggregate, or unbundle, the services traditionally offered by banks into less expensive and accessible platforms (Klein &amp; Mayer, 2011; Zollmann &amp; Cojocaru, 2015).</p><p>Mobile payments systems largely compete with formal mechanisms offered by banks, as well as cash-based and informal systems. The former is a dynamic growth area in terms of competition, in so far as MNOs have drawn in people who were previously unbanked, as well as some proportion of traditional bank clients. In turn, banks increasingly offer mobile banking and mobile money as value-added services to their customers, although this relies on the infrastructure of mobile operators.</p><p><a href="https://pdfs.semanticscholar.org/7526/eab68ea44a5d4e7cf36df2b9abdf3c245e51.pdf">https://pdfs.semanticscholar.org/7526/eab68ea44a5d4e7cf36df2b9abdf3c245e51.pdf</a></p><h3>What is a Stablecoin?</h3><p>A stablecoin refers to a new class of cryptocurrencies which attempt to offer price stability and/or are backed by reserve asset(s).(Investopedia)</p><h3>What Stablecoins are there?</h3><p>Paxos Trust Co. and Gemini Trust Co were launched last year with approval from New York regulators, which was a first.</p><p>That means the dollars used to purchase these tokens — the Paxos Standard and Gemini Dollar — are held in trusts or banks, audited regularly and regulated by the New York Department of Financial Services, adding an extra layer of protection, according to the companies.</p><p>Two other stablecoins, USD Coin and TrueUSD, aren’t regulated but the companies behind them say their approaches are designed to minimize risk. USD Coin is managed by a consortium of companies, including Coinbase Inc. and Circle Internet Financial Ltd., so that no one company controls the digital currency’s fate, according to Emre Tekisalp, the USD Coin project lead at Coinbase. TrueUSD, created by TrustToken, holds its collateral in multiple third-party trust companies to reduce risk for investors, says Jai An, TrustToken’s CEO. (WSJ)</p><p>Market supply</p><p>USDC — $444 Million</p><p>TrueUSD — $200 Million</p><p>Paxos — $238 Million</p><p>GUSD — $9 Million</p><p>Dai — $78 Million</p><p>*data from Coinmarketcap.com</p><h3><strong>Who this app helps best</strong></h3><h4>People</h4><p>· Where weak foreign currency policy has left local currency hyper inflated</p><p>· Where corrupt governments threaten personal property rights</p><p>· Where there is weak or non-existing banking infrastructure</p><p>· Send remittances for much cheaper than alternatives like Western Union</p><p>· That want complete control of funds in the payment lifecycle</p><h4>Businesses with/or that want:</h4><p>· Weak or non-existent access to payment processing</p><p>· Fast payments (we work as fast as credit cards and payments settle faster than wire transfers)</p><p>· Want lower fees than credit cards (we charge 1% + market price gas cost to transact on the Ethereum network, typically $0.03–0.20)</p><p>· No chargebacks</p><p>· Want to accept alternative digital currency like TUSD, USDC, or DAI (a stable coin pegged to the USD, backed by collateralized Ether)</p><p>· Have a need for access to a network that provides a connection to the US Banking system. The recent rise of digital token stable coins, help address part of the problem. Our app provides a user-friendly way to send instant payments while also complying with AML/KYC laws</p><h3>How our app works</h3><p>• User deposits funds to smart contract via mobile app from private wallet</p><p>• Users can search for other users by username</p><p>• User signs a transaction with the amount to pay and wallet address (which is provided via app), which is then sent to a processing queue for settlement.</p><p>• The merchant balance is updated on app immediately, but it may take up to an hour for the transaction to settle on the Ethereum network.</p><p>• Once the funds have settled on the network the user can send a request to withdraw the amount received.</p><p>• User must send a request to withdraw to prevent users from withdrawing when they owe money. We can only prevent withdrawal of funds for approximately one week but we cannot at any time seize customer funds due to the decentralized nature of the smart contract.</p><p>Smart contract code publicly viewable and verifiable here: <a href="https://etherscan.io/address/0x1292463b22ed4cb340c737fbc046258fb428f27c#code">https://etherscan.io/address/0x1292463b22ed4cb340c737fbc046258fb428f27c#code</a></p><p>What the WSJ says<br> <br> Eventually, supporters say, stablecoins could be used in a variety of ways, including in the creation of payment systems for people in developing countries who don’t have access to banks. Some analysts, however, say this won’t happen soon.</p><p>“Many countries don’t have the infrastructure,” says Larry Cermak, head analyst at crypto research firm The Block. “You can’t do much with [stablecoins] unless someone accepts it. The only thing you can do is send it to people — unless you convince merchants to accept it, which isn’t happening. That’s years off.”</p><p><a href="https://www.wsj.com/articles/why-stablecoins-stand-out-in-the-cryptocurrency-world-11560218460">https://www.wsj.com/articles/why-stablecoins-stand-out-in-the-cryptocurrency-world-11560218460</a></p><h3>When can I start using the app?</h3><p>Right now! Follow this link to download the app. <a href="https://apps.apple.com/us/app/mopayd/id1479303782?ls=1">https://apps.apple.com/us/app/mopayd/id1479303782?ls=1</a></p><p><a href="https://dexbrokerage.com/"><em>https://mopayd.com</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=15f78b2fd8d5" width="1" height="1" alt=""><hr><p><a href="https://medium.com/mopayd/introducing-mopayd-a-mobile-payments-company-powered-by-stablecoins-on-the-ethereum-network-15f78b2fd8d5">Introducing mopayd, a mobile payments company powered by stablecoins on the Ethereum network</a> was originally published in <a href="https://medium.com/mopayd">mopayd</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to create, execute, and destroy options on Dex Brokerage]]></title>
            <link>https://medium.com/dexbrokerage/how-to-create-execute-and-destroy-options-on-dex-brokerage-4c4afd35464a?source=rss-843f4582c6d8------2</link>
            <guid isPermaLink="false">https://medium.com/p/4c4afd35464a</guid>
            <category><![CDATA[cryptocurrency]]></category>
            <category><![CDATA[fintech]]></category>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[cryptocurrency-investment]]></category>
            <category><![CDATA[blockchain]]></category>
            <dc:creator><![CDATA[Alex George]]></dc:creator>
            <pubDate>Sun, 04 Nov 2018 21:32:25 GMT</pubDate>
            <atom:updated>2018-11-05T22:00:48.598Z</atom:updated>
            <content:encoded><![CDATA[<h3>Step 1 — Navigate to the options page</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/290/1*g1Qdb_U-5v7jMMoY2mgBIQ.png" /></figure><h3>Step 2— Select the options pair you wish to trade</h3><p>Select “Call” or “Put”, then select the month, and then select the date. In the below example Nov, 2018 is selected, and then Nov 9th, is selected.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/314/1*b-shUXa0kt1I3GjtHiU0bA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/796/1*juXQ17u0qnz5JYWl9OIDFg.png" /><figcaption>Options tokens are filtered by type, year, month, and date.</figcaption></figure><h3>Step 3— Creating an option</h3><p><em>Note: Options are created,executed, and destroyed directly from your wallet balance, NOT the balance you hold on the exchange.</em></p><p><strong>Call options:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/396/1*IUBS3NBP03PCC7i5X-xdsQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/358/1*XLxIkyICTzH5RsXkdSoZXA.png" /></figure><p>After you create the call option you will need to deposit it into the exchange if you wish to trade it. You can view your balance by visiting the balance section on the website and viewing the “My Wallet Balance” section.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2iTegyEB8ivzH9rGpHenEA.png" /><figcaption>My Wallet Balance is your balance in your personal wallet. My Dex Brokerage Balance is your balance deposited on the exchange.</figcaption></figure><p>You can also view it on Metamask if you add the token contract address.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/355/1*Zg3LMWhm2WkK_nDbbjdA4A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/353/1*JjciQBkV-BPleASpSPAmbg.png" /><figcaption>You must use the non-beta version of Metamask, since the beta version of Metamask doesn’t allow you to add tokens with long symbol names</figcaption></figure><h4>Put options:</h4><p>When tokens are used for the option, you must approve the option contract as a spender first. The strike is 10 TKM, so to create one put option (ETHTKM181123P00000010), you will need to deposit this into the smart contract.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/467/1*Da11sbR62Wl1dzt1BQWaTg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/354/1*yLLBGaQZd-nwPa4s5JYMsw.png" /></figure><p>Once you’ve approved the token, you can then create the put option token.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/496/1*ktKegPfnFEKhHSNTdHwwuQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/357/1*IZ2-IHzcoVvQQL29xhvPjg.png" /></figure><h3>Step 4— Executing an option</h3><p>To execute a call option, you need both the option token and the token used for the strike. In this case the strike is the TKM token. Again, for tokens you must approve the option contract as a spender first. As you can see below, to execute one ETHTKM181109C00000010 you will need to approve 10 TKM. Once executed you can expect to receive 1 ETH, minus execution fees.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/396/1*7IH92oBKEX5pbHyMThCKaQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/353/1*JjciQBkV-BPleASpSPAmbg.png" /></figure><p>Now that 10 TKM tokens have been given approval, you can now execute the option.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/394/1*-UeZ8p6ASv2lNEnq5t7cSw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/356/1*0t5nnBVkAWeMBH-8Ue_rSw.png" /></figure><p>Here’s a link to the transaction for you to view more details.</p><p><a href="https://ropsten.etherscan.io/tx/0x1ee84ca85a682ed691f7562d0a4ead46fcac78f5cd67f8c9bf6a579d8f8bcd09">Ropsten Transaction 0x1ee84ca85a682ed691f7562d0a4ead46fcac78f5cd67f8c9bf6a579d8f8bcd09</a></p><p>To execute a put option, you need both the option token and the first token in the option. In this case the strike is the TKM token. As you can see below, to execute one ETHTKM181123P00000010 you will need to send one Ether. Once executed you can expect to receive 10 TKM, minus execution fees.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/493/1*JO_JdXEvZ_irfCqlWxFXXw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/354/1*NkW3koKYbHmjdhUZYbBWzA.png" /></figure><p>To execute one ETHTKM181123P00000010 you will need to send 1 Ether. Once executed you can expect to receive 10 TKM, minus execution fees.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/352/1*DMuXYo_OU25RyKCwNvwSWw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/358/1*4IvHID9-_rZPnL_B9DIYPw.png" /></figure><p>Here’s a link to the transaction for you to view more details.</p><p><a href="https://ropsten.etherscan.io/tx/0x4f62ae2e05572b9514df0fc22a5166c16e8e7197b1d8e25dedfe35ffecde04cc">Ropsten Transaction 0x4f62ae2e05572b9514df0fc22a5166c16e8e7197b1d8e25dedfe35ffecde04cc</a></p><h3>Step 5— Destroy an option</h3><p>If you have second thoughts about your option token, or you want to close your option position here’s how you do it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/495/1*sBhA7G-sBQ3F0eCJxA7yBQ.png" /><figcaption>Note: You can only destroy options if you have a balance in the contract</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/352/1*xemmyRu0Y3q8qOBFT2b8XQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/356/1*NJ8Ctu4t9ZuWPw-JeFBqtg.png" /><figcaption>Left is before, right hand side shows balance after destroying the call option.</figcaption></figure><h3>The way forward for Dex Brokerage</h3><p>Join the conversation on Discord, Reddit, or follow us on Twitter or Medium, to stay updated on the latest with Dex Brokerage. You can now trade options on our site. For more information about the site please see our other medium posts. If you have any questions, or you want to request an options trading pair please email support@dexbrokerage.com.</p><p><a href="https://dexbrokerage.com/"><em>https://dexbrokerage.com</em></a></p><p><a href="http://bit.ly/dexbrokerageDiscordChat"><em>http://bit.ly/dexbrokerageDiscordChat</em></a><em><br> </em><a href="https://twitter.com/dexbrokerage"><em>https://twitter.com/dexbrokerage</em></a><em><br> </em><a href="https://www.reddit.com/r/dexbrokerage"><em>https://www.reddit.com/r/dexbrokerage</em></a><em><br> </em><a href="https://medium.com/dexbrokerage"><em>https://medium.com/dexbrokerage</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4c4afd35464a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/dexbrokerage/how-to-create-execute-and-destroy-options-on-dex-brokerage-4c4afd35464a">How to create, execute, and destroy options on Dex Brokerage</a> was originally published in <a href="https://medium.com/dexbrokerage">Dex Brokerage</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>