關於網路那些事...

Marketing, SEO, Web trends, Programming tutorial, Web design, and Life event...

Troubleshoot on AWS Elb Return 5xxs Error: 504 Gateway Timeout

We have a service that sometimes got a 504 Gateway Time-Out response from ELB( actually is CLB).

When investigating the root cause, we found out that CLB’s 3 instances are normal in the current two weeks, and the 504 time-outs happened in CLB.

Continue Reading

What different key features between Http1 Http2 Http3?

In this article, we will introduce the main key features of HTTP 1.0, HTTP 1.1, HTTP 2.0, and HTTP 3.0.

HTTP1.0

HTTP1.0 was published in 1996 and already obsoleted.

In HTTP1.0, each request needs to make TCP 3-way-handshake connection, which means will high cost for time-consuming and low efficiency.

Continue Reading

Getting Start install Gitlab Runner in AWS EC2 and Regist

In this article is a tutorial to get started with GitLab Runner, will show you how to install runner in AWS EC2 and registrations to GitLab.

Before you start, you need to make sure local with the following configuration:

  • login AWS CLI
  • Docker
  • nodejs

Continue Reading

Develop and Debug Aws Lambda Function in Local by Vscode

AWS CLI tool - AWS SAM CLI

AWS SAM CLI is a AWS CLI tool that allows you to develop, test and analysis your application in the local environment.

In MAC environment, install SAM tool by brew:

brew tap aws/tap
brew install aws-sam-cli
sam --version

Continue Reading

Aws Opsworks Introduction

Opsworks Introduction AWS OpsWorks is an configuration management service that provides an easy way to create and manage AWS stacks and application. You can preset your AWS resourcce and manage the configuration, deploy those resources and monitor the status of the resources activity.

Continue Reading

How to Setting Kubernetes Secret to Pod Local File

This is part II to illustrate how to setting secret to kubernetes pod local file.

(Aobut the setting secret to environment variables can reference : How to setting kubernetes secret to environment variables )

In Kubernetes, some sensitive information needs to be managed in Pods, which can be managed by Kubernetes secret.

Here we will demonstrate how to manage secrets and save to pod local file.

Continue Reading

How to setting Kubernetes Secret to environment variables

In Kubernetes, some sensitive information needs to be managed in Pods, which can be managed by Kubernetes secret.

Here we will demonstrate how to manage secrets.

Continue Reading

Getting start to run kubernetes

This article will illustrate how to run a Kubernetes in mac M1 local, and learn how to use kubectl command to deploy a service. More detailed concept can reference Kubernetes documents

Continue Reading

Deploy a Go Project to Docker hub by Github Action

In this article, we will create a simple golang application CI/CD process and push it to Docker hub by github action. Finally, will illustrate an example of how to use the terraform and docker-compose to deploy a local docker environment.

Continue Reading

Golang: Gin + Gorilla to build a websocket application

Here we used the gorilla module to build a websocket application, and this tutorial will focus on building up a websoccket server. About client part will implement with the chrome extension: Websocket King.

Continue Reading

Golang: 解決 Go Websocket upgrade:websocket: request origin not allowed by Upgrader.CheckOrigin 跨域問題

Golang: 解決 Go Websocket upgrade:websocket: request origin not allowed by Upgrader.CheckOrigin 跨域問題 錯誤訊息: upgrade:websocket: request origin not allowed by Upgrader.CheckOrigin 原因: 如內文所述,在 Go Websocket 判別跨域來源不合法 解決方式: 需要在 websocket.Upgrader 設定 CheckOrigin 來源,例如下方允許所有來源

Continue Reading

使用 Aws Copilot CLI 部署 AWS ECS

AWS Copilot CLI 是一個開源的 CLI ,可以方便地用於管理 AWS App Runner, AWS ECS, AWS Farget. 只要透過簡單的指令就可搭建起 containerized application, 在本文會先介紹 ECS 以及如何透過 Copilot 來部署應用到 ECS 。 AWS ECS 簡介 AWS ECS(Elastic Container Service) 是一個簡單且高擴充的 container cluster 管理服務, 可以透過 task definnition 定義 container 並且直接運行在 serverless infrastructure (Fargate),或者可以選用 EC2 來做更多的調控。

Continue Reading

Elasticsearch Cluster shards and replicas 常見問題

這邊列出幾個常見的 shards & replicas 問題及流程機制:

Continue Reading

Linux 安裝及配置 Elasticsearch cluster

本文紀錄 Linux 安裝及配置 Elasticsearch 單節點以及 cluster 流程:

Continue Reading

Elasticsearch 常見索引操作彙整

這裡記錄一些 Elasticsearch 常用的索引操作方式,方便之後查詢參考

Continue Reading

Elasticsearch 核心概念及機制說明

這裡記錄一些 Elasticsearch 核心概念及機制說明:

Continue Reading

Getting Started With Tmux

Tmux install and quickly start

Tmux is a terminal multiplexer that can run multiple programs in one terminal. There is powerful to manage several programs in the remote server in one terminal, and using the session to attach or detach them. A prefix is an advanced tool that supports split windows and quick short keys.

That’s getting the start for how to using tmux. Here will showing common usage about tmux.

Continue Reading

What Is Sli Slo Sla and User Facing

A service provider probably has a technology-related service contract with the client to promise about the service level availability and usability.

Here we will discuss service level terminology about SLI/SLO/SLA and User-Facing:

Continue Reading

How to setting mysql long query log to recording slow query

How to setting mysql long query log to recording slow query

Database slow query is a normalized case in operation situation. For example, if a new feature in production has a long data loading time, we can check this situation in the application log or database slow query.

Here, is how to set MySql slow query log.

Continue Reading

Saltstack introduction - How to install salt master and salt minion

Saltstack is an automatic configuration management tool, easy extension infrastructure, and high performance.

Using Saltstack can easy to manage large-scale servers, include dynamic connections, can be used for remote/local execution, config management, etc.

Continue Reading