This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ARG GOPROXY | |
##### Temporal server with Auto-Setup ##### | |
FROM temporalio/ui:2.27.2 as ui | |
FROM temporalio/server:1.24.1.0 as server | |
WORKDIR /etc/temporal | |
FROM temporalio/auto-setup:1.24.1.0 as final |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// DNS Stack | |
export function Dns({ stack, app }: StackContext) { | |
... | |
createLatencyRecords(stack, 'example.app', 'zone_id') | |
} | |
function createLatencyRecords(stack: Stack, domainName: string, hostedZoneId: string) { | |
// Create TXT Records with region names under record name: lbr.example.app | |
// This allows us to query `dns.resolveTxt('lbr.example.app')` to get the | |
// region w/ the lowest latency for DynamoDB to connect to. | |
REGIONS.map(region => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use client' | |
/** | |
* The next/link is poorly designed; as it makes a network request on all links simultaneously, | |
* which DDOS the server and consumes the user device CPU over 100%. | |
* This version defers the requests to be run serially to prevent the spam and prevents CPU overload. | |
* | |
* On mobile/tablets, all links are prefetch serially (since there's no hover state) when they come in view. | |
* On desktop, links are prefetch on hover. | |
*/ |