• About
  • Contact
  • Welcome to Eren’s Blog

  • Access Mysql in a Serializable Way

    go  · 11 Mar 2024

    Goroutine is a magic which allows us to run our logic in a single routine. When it comes to the database, the single routine allow us make access serializable. There is no more lock on the database, which would significantly ramp up the performance, although it may require us write some extra codes.

  • Init Mongo in Docker

    database  · 09 Mar 2024

    This artile introduces a method about how to initialize data for mongodb in docker. We will use mongoimport to import data after the mongodb started in docker.
    We start another container used to execute mongoimport, which is mongo-seed.

  • Back-of-Envelope Estimation

    system, design  · 08 Mar 2024

    Metrics

    After clarify the scope and limit of a problem in the system design interview, it is always a good idea to make a preliminary estimation of some metrics for our system. This will help us later when we will be focusing on scaling, partitioning, load balancing and caching.

  • Go Concurrency Tips

    Go  · 29 Feb 2024

    Introduction

    Here is some tips of go concurrency regarding the book “Concurrency in Go”.

  • When does a Goroutine terminate?

    Go  · 16 Feb 2024

    Question

    If we have a main goroutine(M), a setup goroutine(S), and a work goroutine(W). First, we boot the program with the M never terminated. Then we boot the S within which we start the W. The question is S is alike a parent of W, if S is terminated, will W be terminated?

  • Redirect Custom Variables in Nginx

    Network  · 16 Feb 2024

    Introduction

    It is a common demand to leave some information after a proxy server handled the request. At present, we have an auth server and a chat server. The auth server stands between the user request and chat server used for check the authentication. If the request is valid, we want to add user information into the request that...

  • Support Websocket in Nginx

    Network  · 15 Feb 2024

    Introduction

    Websocket is an application layer protocol enabling bidirectional communication based on TCP transport protocol, compared with http protocol which only allows client sends to server. So when we want to realize some functions like pushing notification or chatting with different users, it is intuitive to utilize the websocket. However, it takes few more steps to make the Nginx...

  • Nginx Configuration for Microservices

    Architecture  · 14 Feb 2024

    Architecture

  • A Backbone Architecture of A typical Web Application

    Architecture  · 01 Feb 2024

    Architecture

  • 【Hard】1157. Online Majority Element In Subarray

    Algorithm  · 16 Apr 2023

    1157. Online Majority Element In Subarray

  • Writing a Kubernetes Controller

    DevOps  · 21 Mar 2023

    Kubernetes controller

  • Cue Overviews for Beginners

    DevOps  · 02 Mar 2023

    Image

  • Orchestrate resource startup using init-containers in Kubernetes

    DevOps  · 06 Dec 2022

    ```shell #!/bin/bash

    wait.sh

    #

    Usage:

    e.g.

    sh wait.sh tcp localhost 8080

    sh wait.sh http www.google.com 80

    # set -e trap exit INT

  • gRPC get starting

    DevOps  · 29 Nov 2022

    Abstract

    This article exhibited a demon of grpc project which mainly demonstrate how to get started grpc and integrate it into a typical go project.

  • Collect app dumps on kubernetes

    DevOps  · 31 Aug 2022

    Background

    当容器中的应用崩溃时,会使容器发出SIGKILL信号,之后容器会立刻崩溃, 导致程序的dump文件也被一起销毁。为了能够保存dump文件,以便之后调查 分析程序崩溃的原因,所以需要一种机制能够收集并保存dump文件。

  • Automated CICD pipeline on GKE

    DevOps  · 12 Aug 2022

    GKE

© Eren's Blog 2024