Este documento compara os custos e fatores operacionais de executar aplicações Golang na AWS utilizando Lambda e EC2/ECS, considerando:
- Uso de memória
- Uso de CPU
- Redis (com Asynq)
- Escrita em disco
- Processamento de filas com Asynq
package main | |
import ( | |
"fmt" | |
"strings" | |
"time" | |
) | |
// ============================================================================ | |
// 1. SINGLE RESPONSIBILITY PRINCIPLE (SRP) |
Em workloads variáveis, escalar o Amazon Aurora Serverless v2 nos horários certos pode reduzir custos e melhorar a performance.
Combinando AWS Lambda + Amazon EventBridge, é possível automatizar o ajuste de capacidade da Aurora de forma programada, com baixo custo de manutenção.
// Place your key bindings in this file to override the defaultsauto[] | |
[ | |
{ | |
"key": "ctrl+shift+d", | |
"command": "editor.action.copyLinesDownAction", | |
"when": "editorTextFocus && !editorReadonly" | |
}, | |
{ | |
"key": "ctrl+shift+alt+down", | |
"command": "-editor.action.copyLinesDownAction", |
{ | |
"application.shellEnvironmentResolutionTimeout": 100, | |
"breadcrumbs.enabled": true, | |
"codesnap.backgroundColor": "transparent", | |
"codesnap.transparentBackground": true, | |
"codesnap.boxShadow": "0 0 0", | |
"editor.selectionClipboard": true, // Only for Linux |
export const formatDateToBR = (date: Date): string => { | |
return new Intl.DateTimeFormat('pt-BR').format(date) | |
} | |
export const formatDateToISO = (date: Date): string => { | |
return date.toDateString().split('T')[0] | |
} | |
export const formatDateToBRShort = (date: Date): string => { | |
return new Intl.DateTimeFormat('pr-BR', { |
var res = pm.response.json(); | |
pm.environment.set('access_token', res.access_token); |
ssh-keygen -t rsa -C "[email protected]" -b 4096 -f ~/.ssh/id_rsa_github
ssh-keygen -t rsa -C "[email protected]" -b 4096 -f ~/.ssh/id_rsa_gitlab
# If you come from bash you might have to change your $PATH. | |
# export PATH=$HOME/bin:$HOME/.local/bin:/usr/local/bin:$PATH | |
# Path to your Oh My Zsh installation. | |
export ZSH="$HOME/.oh-my-zsh" | |
# Set name of the theme to load --- if set to "random", it will | |
# load a random theme each time Oh My Zsh is loaded, in which case, | |
# to know which specific one was loaded, run: echo $RANDOM_THEME | |
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes |