Skip to content

Instantly share code, notes, and snippets.

View TranBaVinhSon's full-sized avatar
🎯
Focusing

Tran B. V. Son TranBaVinhSon

🎯
Focusing
View GitHub Profile
@petitviolet
petitviolet / nginx_deployment.yaml
Created March 11, 2018 11:04
sample Nginx configuration on Kubernetes using ConfigMap to configure nginx.
apiVersion: v1
kind: ConfigMap
metadata:
name: nginx-conf
data:
nginx.conf: |
user nginx;
worker_processes 3;
error_log /var/log/nginx/error.log;
events {
@manhdaovan
manhdaovan / worker_pool.go
Last active June 24, 2019 07:37
Worker pool in Go
package workerpool
import (
"context"
)
/*
* Worker Pool for executing heavy tasks to avoid OOM error from OS
* Usage example:
* pool := workerpool.NewPool(3) // Number of workers should be adjusted appropriately to your services