From 6310d51eae55cc7322d62f92840279cfb8257067 Mon Sep 17 00:00:00 2001 From: Andre Medeiros Date: Wed, 2 Nov 2022 01:08:33 -0400 Subject: [PATCH] simplify architecture --- render.yaml | 92 ++--------------------------------------------------- 1 file changed, 3 insertions(+), 89 deletions(-) diff --git a/render.yaml b/render.yaml index 0bff8a4..b5e78ec 100644 --- a/render.yaml +++ b/render.yaml @@ -89,107 +89,21 @@ services: buildCommand: go install github.com/bugsnag/panic-monitor@latest && go build ./cmd/apollo startCommand: panic-monitor ./apollo api -# Notifications +# Worker - type: worker - name: worker.notifications + name: worker env: go plan: starter envVars: - fromGroup: env-settings - key: BUGSNAG_APP_TYPE value: worker - - key: BUGSNAG_METADATA_QUEUE - value: notifications scaling: minInstances: 10 maxInstances: 30 targetCPUPercent: 80 buildCommand: go install github.com/bugsnag/panic-monitor@latest && go build ./cmd/apollo - startCommand: panic-monitor ./apollo worker --queue NotificationCheckJob --consumers 256 - -# Stuck Notifications Checker -- type: worker - name: worker.notifications.stuck - env: go - plan: starter - envVars: - - fromGroup: env-settings - - key: BUGSNAG_APP_TYPE - value: worker - - key: BUGSNAG_METADATA_QUEUE - value: stuck - scaling: - minInstances: 2 - maxInstances: 10 - targetCPUPercent: 80 - buildCommand: go install github.com/bugsnag/panic-monitor@latest && go build ./cmd/apollo - startCommand: panic-monitor ./apollo worker --queue StuckNotificationsJob --consumers 64 - -# Scheduler -- type: worker - name: app.scheduler - env: go - plan: starter - envVars: - - fromGroup: env-settings - - key: BUGSNAG_APP_TYPE - value: scheduler - buildCommand: go install github.com/bugsnag/panic-monitor@latest && go build ./cmd/apollo - startCommand: panic-monitor ./apollo scheduler - -# Subreddit Watcher -- type: worker - name: worker.watcher.subreddits - env: go - plan: standard - envVars: - - fromGroup: env-settings - - key: BUGSNAG_APP_TYPE - value: worker - - key: BUGSNAG_METADATA_QUEUE - value: subreddits - scaling: - minInstances: 2 - maxInstances: 10 - targetCPUPercent: 80 - buildCommand: go install github.com/bugsnag/panic-monitor@latest && go build ./cmd/apollo - startCommand: panic-monitor ./apollo worker --queue SubredditWatcherJob - -# Trending Posts Watcher -- type: worker - name: worker.watcher.trending - env: go - plan: starter - envVars: - - fromGroup: env-settings - - key: BUGSNAG_APP_TYPE - value: worker - - key: BUGSNAG_METADATA_QUEUE - value: trending - scaling: - minInstances: 2 - maxInstances: 10 - targetCPUPercent: 80 - buildCommand: go install github.com/bugsnag/panic-monitor@latest && go build ./cmd/apollo - startCommand: panic-monitor ./apollo worker --queue SubredditTrendingJob - -# Live Activities -- type: worker - name: worker.live-activities - env: go - plan: starter - envVars: - - fromGroup: env-settings - - key: BUGSNAG_APP_TYPE - value: worker - - key: BUGSNAG_METADATA_QUEUE - value: live-activities - scaling: - minInstances: 1 - maxInstances: 10 - targetCPUPercent: 80 - buildCommand: go install github.com/bugsnag/panic-monitor@latest && go build ./cmd/apollo - startCommand: panic-monitor ./apollo worker --queue LiveActivityJob + startCommand: panic-monitor ./apollo worker --consumers 256 envVarGroups: # Environment