西维蜀黍

【MySQL】Replication - Binlog-based

Binary Log file - position-based Replication

MySQL refers to its traditional replication method as binary log file position-based replication, where the MySQL instance operating as the source (where the database changes take place) writes updates and changes as “events” to the binary log. The information in the binary log is stored in different logging formats according to the database changes being recorded. Replicas are configured to read the binary log from the source and to execute the events in the binary log on the replica’s local database.

Each replica receives a copy of the entire contents of the binary log. It is the responsibility of the replica to decide which statements in the binary log should be executed. Unless you specify otherwise, all events in the source’s binary log are executed on the replica. If required, you can configure the replica to process only events that apply to particular databases or tables.

Each replica keeps a record of the binary log coordinates: the file name and position within the file that it has read and processed from the source. This means that multiple replicas can be connected to the source and executing different parts of the same binary log. Because the replicas control this process, individual replicas can be connected and disconnected from the server without affecting the source’s operation. Also, because each replica records the current position within the binary log, it is possible for replicas to be disconnected, reconnect and then resume processing.

  ...


【Architectural Pattern】Event-driven Architecture

Event-driven Architecture (EDA)

An event-driven architecture uses events to trigger and communicate between decoupled services and is common in modern applications built with microservices. An event is a change in state, or an update, like an item being placed in a shopping cart on an e-commerce website. Events can either carry the state (the item purchased, its price, and a delivery address) or events can be identifiers (a notification that an order was shipped).

Event-driven architectures have three key components: event producers, event routers, and event consumers. A producer publishes an event to the router, which filters and pushes the events to consumers. Producer services and consumer services are decoupled, which allows them to be scaled, updated, and deployed independently.

  ...


【Programming】Reactive Programming

  ...


【MySQL】Replication

MySQL Replication

Replication enables data from one MySQL database server (known as a source) to be copied to one or more MySQL database servers (known as replicas). Replication is asynchronous by default; replicas do not need to be connected permanently to receive updates from a source. Depending on the configuration, you can replicate all databases, selected databases, or even selected tables within a database.

  ...


【FreeBSD】Display Memory Info

$ dmidecode -t memory
...
Memory Device
	Array Handle: 0x0042
	Error Information Handle: Not Provided
	Total Width: 64 bits
	Data Width: 64 bits
	Size: 8192 MB
	Form Factor: DIMM
	Set: None
	Locator: ChannelB-DIMM1
	Bank Locator: BANK 3
	Type: DDR3
	Type Detail: Synchronous
	Speed: 1600 MT/s
	Manufacturer: Kingston
	Serial Number: 6C0C3BA8
	Asset Tag: 9876543210
	Part Number: KHX1600C10D3/8GX
	Rank: 2
	Configured Memory Speed: 1600 MT/s
	...
  ...


【Distributed System】Consistency Analysist on Different Middlewares

Redis

需要注意的是,在所有master-slave系统中,可以是CAP中 CP 系统, 即C(strong consistency)可以被保证。

  ...


【RocksDB】basic

RocksDB

The RocksDB library provides a persistent key value store. Keys and values are arbitrary byte arrays. The keys are ordered within the key value store according to a user-specified comparator function.

  ...


【Kafka】Troubleshooting

could not be established. Broker may not be available

Error

$ kafka-topics --bootstrap-server 192.168.18.134:9092 --topic demo_topic --describe
[2021-10-10 22:39:38,319] WARN [AdminClient clientId=adminclient-1] Connection to node -1 (/192.168.18.134:29092) could not be established. Broker may not be available. (org.apache.kafka.clients.NetworkClient)
  ...


【Kafka】Advance

  ...


【TrueNAS】VM 磁盘空间不足

在进入Ubuntu调整之前,需要先在Pool中将该ZVol的可占用空间调大,我这里已经调到了200GB

  ...