

<feed xmlns="http://www.w3.org/2005/Atom">
  <id>http://blog.cptz.space/</id>
  <title>Cptz's blog</title>
  <subtitle>A minimal, responsive and feature-rich Jekyll theme for technical writing.</subtitle>
  <updated>2024-12-05T11:50:43+08:00</updated>
  <author>
    <name>Cptz</name>
    <uri>http://blog.cptz.space/</uri>
  </author>
  <link rel="self" type="application/atom+xml" href="http://blog.cptz.space/feed.xml"/>
  <link rel="alternate" type="text/html" hreflang="en"
    href="http://blog.cptz.space/"/>
  <generator uri="https://jekyllrb.com/" version="4.3.4">Jekyll</generator>
  <rights> © 2024 Cptz </rights>
  <icon>/assets/img/favicons/favicon.ico</icon>
  <logo>/assets/img/favicons/favicon-96x96.png</logo>


  
  <entry>
    <title>分布式系统基础</title>
    <link href="http://blog.cptz.space/posts/fundamentals-of-distributed-systems/" rel="alternate" type="text/html" title="分布式系统基础" />
    <published>2023-05-12T20:23:15+08:00</published>
  
    <updated>2023-05-12T20:23:15+08:00</updated>
  
    <id>http://blog.cptz.space/posts/fundamentals-of-distributed-systems/</id>
    <content src="http://blog.cptz.space/posts/fundamentals-of-distributed-systems/" />
    <author>
      <name>Cptz</name>
    </author>

  
    
    <category term="Reading Notes" />
    
    <category term="深入理解分布式系统" />
    
  

  
    <summary>
      





      分布式数据

背景

系统始于单节点，由于单节点的硬件限制(CPU，硬盘等资源)以及单点故障问题，系统走向分布式架构，如何分散存储数据？

分区

将一个大的数据集拆分成多个较小的数据集，通过增加节点来增大存储以及处理数据的规模。分区分为水平分区与垂直分区。


  水平分区： 对表的行进行拆分，表的特性得以保留。例如把十年的订单记录按年划分到10个物理节点中存储。
  垂直分区： 对表的列进行拆分，每个分区包含该列对应的所有行。


两种分区方法各有优势，水平分区可以方便对满足一定条件(与分区方式接近)的数据做处理，垂直分区可以方便对表中某些属性做分析。在某些情况可以同时采用两种分区方法，并根据请求的逻辑来选择分发给水平分区的数据库还是垂直分区的数据库。

水平分区算法


  范围分区
  哈希分区


两种分区方法各有优劣，范围分区实现简单，对小范围的数据处理性能好


  
...
    </summary>
  

  </entry>

  
  <entry>
    <title>Build Your Own Image Bed</title>
    <link href="http://blog.cptz.space/posts/build-your-own-image-bed/" rel="alternate" type="text/html" title="Build Your Own Image Bed" />
    <published>2023-05-10T20:55:00+08:00</published>
  
    <updated>2023-05-10T20:55:00+08:00</updated>
  
    <id>http://blog.cptz.space/posts/build-your-own-image-bed/</id>
    <content src="http://blog.cptz.space/posts/build-your-own-image-bed/" />
    <author>
      <name>Cptz</name>
    </author>

  
    
    <category term="Experience" />
    
    <category term="Tutorial" />
    
  

  
    <summary>
      





      本文旨在记录自己使用 minio 与 Go 语言实现的个人 Typora 图床，此外 minio 还可以用于私人的存储服务。

搭建 minio 服务

Docker 部署

首先需要搭建 minio 对象存储服务，需要通过环境变量设置 root 用户的账号密码

docker run -d --name minio-server \
    -p 9000:9000 -p 9001:9001 \
    --env MINIO_ROOT_USER="minio-root-user" \
    --env MINIO_ROOT_PASSWORD="minio-root-password" \  
    bitnami/minio:latest


随后进入 IP:9001 ，使用上述设置的账号密码登录进入 minio dashboard

创建用户

单击 User ，新建一个访...
    </summary>
  

  </entry>

</feed>


