Skip to content

Instantly share code, notes, and snippets.

View sajanjswl's full-sized avatar
🎯
Focusing

Sajan Jaiswal sajanjswl

🎯
Focusing
View GitHub Profile
@sajanjswl
sajanjswl / index.md
Created April 30, 2021 17:32 — forked from bojand/index.md
gRPC and Load Balancing

Just documenting docs, articles, and discussion related to gRPC and load balancing.

https://github.com/grpc/grpc/blob/master/doc/load-balancing.md

Seems gRPC prefers thin client-side load balancing where a client gets a list of connected clients and a load balancing policy from a "load balancer" and then performs client-side load balancing based on the information. However, this could be useful for traditional load banaling approaches in clound deployments.

https://groups.google.com/forum/#!topic/grpc-io/8s7UHY_Q1po

gRPC "works" in AWS. That is, you can run gRPC services on EC2 nodes and have them connect to other nodes, and everything is fine. If you are using AWS for easy access to hardware then all is fine. What doesn't work is ELB (aka CLB), and ALBs. Neither of these support HTTP/2 (h2c) in a way that gRPC needs.

@sajanjswl
sajanjswl / README.md
Created March 23, 2021 17:11 — forked from jamesmishra/README.md
Using Terraform to run a docker-compose.yml file directly on an Amazon EC2

Introduction

This is a Hashicorp Terraform module that provisions an AWS EC2 instance for the purpose of running a given docker-compose.yml file.

Usage

# ===== OUR MAGIC DOCKER-COMPOSE.YML FILE HERE =====
# It is also possible to get Terraform to read an external `docker-compose.yml`
# file and load it into this variable.
# We'll be showing off a demo nginx page.
version: '3'
volumes:
minioDB:
services:
minio:
image: minio/minio
container_name: minio
environment:
version: '3'
volumes:
mysqlDB:
networks:
mysql-network:
driver: bridge
services:
@sajanjswl
sajanjswl / proto-gen.sh
Created February 20, 2020 22:09
golang-crash-course
protoc --proto_path=../api/proto/v1 --go_out=plugins=grpc:../pkg/api/v1 file-service.proto
syntax = "proto3";
package v1;
service FileService {
//simple RPC
rpc RegisterUser( RegisterUserRequest) returns (RegisterUserResponse){};
// client-side straming RPC
@sajanjswl
sajanjswl / compose.yml
Created February 15, 2020 19:52
compose file for MongoDb and Mong-express
version: '3.1'
volumes:
mongoData:
networks:
mongo_net:
driver: bridge