Amo Chen

What Backend Engineers Need to Know for Interviews — Load Balancer vs. Reverse Proxy vs. API Gateway vs. HAProxy

Backend engineers often encounter the following technologies and tools in their daily work or during interviews:

  • Load Balancer
  • Reverse Proxy
  • API Gateway
  • HAProxy

The commonality between these technologies is that they are all on the front line of handling traffic, but their uses differ, which can lead to confusion.

This article will clarify the differences between these technologies and tools to understand their respective functions and application scenarios, avoiding common misunderstandings.

Posted on  Sep 11, 2024  in  Backend Interview Preparation  by  Amo Chen  ‐ 6 min read

Awesome Article Sharing — 5 Cool Chrome DevTools Features You Might Not Know

“5 Cool Chrome DevTools Features Most Developers Don’t Know About” outlines five useful Chrome DevTools features. After reading, I realized I only knew one out of the five, and the other four are quite handy… The four features are: Live Expression This allows you to monitor the change of a value in real-time, such as the screen width, a specific element, or a JavaScript variable. Logpoints You can insert console.log() without modifying the JavaScript code.

Posted on  Jun 4, 2024  by  Amo Chen  ‐ 2 min read

Understanding Go's Defer, Panic(), Recover() for Exception/Error Handling through Python's Try Except

During the process of learning Go, many might find themselves puzzled by the way Go handles exceptions/errors using defer(), panic(), recover(). Especially for developers already familiar with languages like Java, JavaScript, and Python, the try...catch, try-except mechanisms seem more intuitive and readable during development.

However, understanding Go’s defer(), panic(), recover() can be easier if we start from familiar patterns. By doing so, what initially seems complex may become much clearer.

This article will help you learn how Go handles exceptions from the perspective of Python’s try-except mechanism.

Posted on  Mar 27, 2024  in  Go Programming - Beginner Level  by  Amo Chen  ‐ 7 min read

Feature Flags Are Ruining Your Codebase

Feature Flags are a commonly used technique when releasing new features. They allow us to quickly turn specific features on or off, such as in the following Python code example, where you can switch between the new and old payment services through configuration settings: USE_NEW_PAYMENT_SERVICE = config.get('NEW_PAYMENT_SERVICE') is True if USE_NEW_PAYMENT_SERVICE: ...(the new logic) else: ...(the old logic) While Feature Flags are convenient, they also bring many issues that we should be aware of or may have experienced ourselves.

Posted on  Mar 25, 2024  by  Amo Chen  ‐ 3 min read

Security Alert — Beware of Malicious Links in GA4, Search Console, and Other Services

Recently, a type of malicious attack method has emerged, which uses the Referer header in HTTP to spread harmful URLs. Because the Referer header is collected by website traffic monitoring services like GA4, Search Console, and Webmaster, attackers exploit it to create popular links. This tactic is aimed at sparking curiosity in data analysts who might then click on these malicious URLs, potentially leading to security issues (such as malicious programs being injected through browser vulnerabilities)!

Posted on  Mar 21, 2024  by  Amo Chen  ‐ 1 min read

How to Neatly Display Parallel Output in Terminal?

When using modules like multiprocessing or threading for parallel processing, have you ever wondered how to print string messages from each process or thread effectively?

Most people would simply use print() in the terminal. However, when the output is too long or too much, it might not be particularly useful. In such scenarios, it’s often best to write the outputs to a file so you can trace back any issues later.

Still, most of the time, we want to know the latest status of each executing unit, like which step it’s currently at. If these outputs continue to pile up in the terminal, it inevitably makes the terminal quite messy.

In this article, I will introduce a method to refresh and overlay outputs of parallel processing, so you can see the latest status of each unit while keeping the terminal clean and elegant!

Posted on  Mar 13, 2024  in  Python Programming - Intermediate Level  by  Amo Chen  ‐ 3 min read

Explanation of MongoDB Write Concern and Read Concern

Understanding MongoDB Write Concern and Read Concern is essential when working with MongoDB cluster environments. Lack of familiarity with these two crucial concepts may lead to unexpected operations and even result in bugs.

This article aims to introduce MongoDB Write Concern and Read Concern in an easy-to-understand manner.

Posted on  Jan 11, 2024  by  Amo Chen  ‐ 8 min read

A Plain Explanation of IndexedDB

Browsers offer several methods for storing data, and not all data needs to be saved on a backend database. Among the most commonly known and used are cookies and localStorage. IndexedDB tends to be used less frequently since many scenarios are usually handled by backend servers. However, IndexedDB is actually a type of NoSQL storage provided by browsers. It supports transactions and indexing, allowing for range queries. It even considers database versioning, which facilitates data migration using version numbers.

Posted on  Dec 29, 2023  by  Amo Chen  ‐ 2 min read