西维蜀黍

【Docker】Container 常用命令 - run

新建、启动并停止容器 - docker run

See https://docs.docker.com/engine/reference/commandline/run/ .

$ docker run [OPTIONS] IMAGE [COMMAND] [ARG...]

docker run命令是新建并启动容器,每运行一次,就会新建一个容器。同样的命令运行两次,就会生成两个一模一样的容器文件(当前也会创建两个容器)。

在新建完成之后,容器会被终止。

  ...


【Cache System】缓存更新策略 - Cache Invalidation

Cache Invalidation

Cache invalidation is a process in a computer system whereby entries in a cache are replaced or removed.

It can be done explicitly, as part of a cache coherence protocol. In such a case, a processor changes a memory location and then invalidates the cached values of that memory location across the rest of the computer system.

  ...


【macOS】制作 Windows 启动 U 盘

If you want an English-language version of the latest update of Windows 10, you can download the ISO here.

  ...


【macOS】查看 Log

$ watch -n 0.1 "sudo dmesg | tail -n $((LINES-6))"

$ tail -f /var/log/system.log
  ...


【Cache System】Hot Key Issue

Causes

The hotkey issue can have the following two causes:

  • The size of data consumed by users is much greater than that of produced data, as in the cases of hot sale items, hot news, hot comments, and celebrity live streaming.

    • The hotkey issue tends to occur unexpectedly, for example, the sales price promotion of popular commodities during Double 11. When one of these commodities is browsed or purchased tens of thousands of times, a large number of requests are processed, which causes the hotkey issue. Similarly, the hotkey issue tends to occur in scenarios where more read requests are processed than write requests. For example, hot news, hot comments, and celebrity live streaming.
  • In these cases, hotkeys are accessed much more frequently than other keys. Therefore, most of the user traffic is centralized to a specific Redis instance, and the Redis instance may reach a performance bottleneck.

    • When a piece of data is accessed on the server, the data is partitioning. During this process, the corresponding key is accessed on the server. When the load exceeds the performance threshold of the server, the hotkey issue occurs.
  ...