Skip to content

Instantly share code, notes, and snippets.

@sourcec0de
Forked from jonymusky/replayconf-2024.md
Created September 25, 2024 14:51
Show Gist options
  • Save sourcec0de/2642a58ea18f80595df317e8f3582f94 to your computer and use it in GitHub Desktop.
Save sourcec0de/2642a58ea18f80595df317e8f3582f94 to your computer and use it in GitHub Desktop.

Revisions

  1. @jonymusky jonymusky revised this gist Sep 20, 2024. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions replayconf-2024.md
    Original file line number Diff line number Diff line change
    @@ -38,6 +38,10 @@ Offering **pain-free upgrades**, improved monitoring, and optimized workflows. E
    - Public Preview of Nexus: **Durable RPC** – allowing namespaces to communicate with each other.
    - [Temporal Nexus Architecture](https://github.com/temporalio/temporal/blob/main/docs/architecture/nexus.md)

    Motivations about nexus:
    ![IMG_9094](https://gist.github.com/user-attachments/assets/c5547da7-ae1c-4a18-bd67-c473ca14d452)


    ## Best Practices
    - **Signals**: Avoid overuse of signals as it can be difficult to trace status of a workflow.
    - **Child Workflows**: Consider using child workflows to paralellize tasks.
  2. @jonymusky jonymusky created this gist Sep 20, 2024.
    87 changes: 87 additions & 0 deletions replayconf-2024.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,87 @@
    # Replay2024 - Temporal Notes

    Replay2024 conference held in Seattle on September 19th and 20th, 2024.

    ## Table of Contents
    - [From the Keynote](#from-the-keynote)
    - [Temporal Cloud](#temporal-cloud)
    - [Key Updates Announced during the Conference](#key-updates-announced-during-the-conference)
    - [Best Practices](#best-practices)
    - [Strategy](#strategy)
    - [Advanced Techniques / Ideas](#advanced-techniques--ideas)
    - [Deployment & Versioning](#deployment--versioning)
    - [Additional Insights](#additional-insights)
    - [References](#references)


    ## From the keynote
    - Temporal’s goal in the organization is to allow engineers to sleep peacefully and have their time while on-call.
    - **System failures lead to chaos**:
    - On-call issues slow down the speed of releasing new features.
    - Stress levels among engineers are high, with **27% changing jobs** due to on-call stress.
    - With Temporal, no additional code is needed for recovery.



    ## Temporal Cloud
    Analyze why many self-hosted companies are transitioning to Temporal Cloud.
    Moving to Temporal Cloud is also part of Temporal’s philosophy, which is to allow engineers to sleep peacefully.
    Offering **pain-free upgrades**, improved monitoring, and optimized workflows. Engineers can focus on innovation rather than firefighting.


    ## Key Updates Announced during the conference
    1. **Workflow update performance**: Improved speed from 50ms to 30ms in p90.
    2. **Worker Auto-tune**: Now automatically defines memory and CPU to avoid crashes, using Kubernetes metrics for horizontal pod scaling.
    3. **Temporal Cloud**: Migration to GPC (Google Cloud Platform).
    - Note: Ensure SSL setup.
    4. **Temporal Nexus**: Enables communication between multiple namespaces, each with its own rules.
    - Public Preview of Nexus: **Durable RPC** – allowing namespaces to communicate with each other.
    - [Temporal Nexus Architecture](https://github.com/temporalio/temporal/blob/main/docs/architecture/nexus.md)

    ## Best Practices
    - **Signals**: Avoid overuse of signals as it can be difficult to trace status of a workflow.
    - **Child Workflows**: Consider using child workflows to paralellize tasks.
    - **Workflow Continuity**: Design workflows to **continue-as-new**, ensuring they upgrade smoothly when replay tests succeed.
    - **Ideas for SDLC Changes**
    ![IMG_9117](https://gist.github.com/user-attachments/assets/fbbb7e72-8d4d-426c-aae7-28dfa0cff334)
    ![IMG_9113 2 Large](https://gist.github.com/user-attachments/assets/85803012-768e-4611-b4a5-ba92348e46d5)


    ### Strategy
    In case a quick response is needed, consider having two workflows: one for the critical part that provides the response, and another that can continue handling non-critical operations at a slower pace

    ## Advanced Techniques / Ideas
    - **Parent workflows**: Implement techniques to drain queues of child workflows efficiently.
    - Before: Every click created a new parallel workflow, leading to multiple parallel operations.
    - Now: Signals queue a child workflow but wait for the previous one to finish.
    - **Scheduled Workflows**: Schedule executions when timing is not critical. Avoiding times when we are under heavy traffic.
    - **Compensation Workflows**:
    ![IMG_9111 Large](https://gist.github.com/user-attachments/assets/6c1e4d0f-eff9-4853-ab4f-0930a134af05)
    - Update with start (something new to replace the use of child workflows):
    ![IMG_9112 Large](https://gist.github.com/user-attachments/assets/ba8514c4-f7be-4c5d-9556-e2f7b327fb8f)


    ## Deployment & Versioning
    - **Pinning Workflows**: Introduce new workflow versions (e.g., V2 / V3).
    - **Rainbow Deployments**: Deploy multiple pods and move traffic dynamically for optimized load balancing.

    ## Additional Insights
    - **Workflow ID Naming**: Java-based workflows have a naming limit of 256 characters.
    - On self-hosted: Check SSL Certificates expiration.
    ![IMG_9103](https://gist.github.com/user-attachments/assets/b4c6fc04-4e24-4041-85bc-95bbdaede3ad)

    - Implement HPA with Kubernetes
    ![IMG_9104](https://gist.github.com/user-attachments/assets/12a08482-48a1-41b8-83a8-7ec8540f630c)

    - Info about Breaking Changes
    ![IMG_9115](https://gist.github.com/user-attachments/assets/970f79a6-4171-4542-aed5-a7ebefe1a305)


    ---

    **References**:
    - [Nexus Architecture Documentation](https://github.com/temporalio/temporal/blob/main/docs/architecture/nexus.md)
    - [Replay2024 Temporal Notes Gist](https://gist.github.com/jingyi2318/95c8c2a539a39f56459745386f8023d9)


    All screenshots were taken during the conference and are not my own. I highly recommend reviewing the talks once they are published and congratulating the engineers behind them