<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>分布式 on luanrz's blog</title><link>https://luanrz.github.io/tags/%E5%88%86%E5%B8%83%E5%BC%8F/</link><description>Recent content in 分布式 on luanrz's blog</description><generator>Hugo</generator><language>zh-cn</language><lastBuildDate>Tue, 16 May 2023 21:00:00 +0800</lastBuildDate><atom:link href="https://luanrz.github.io/tags/%E5%88%86%E5%B8%83%E5%BC%8F/index.xml" rel="self" type="application/rss+xml"/><item><title>Redis分布式ID实现</title><link>https://luanrz.github.io/posts/%E4%B8%AD%E9%97%B4%E4%BB%B6/redis%E5%88%86%E5%B8%83%E5%BC%8Fid%E5%AE%9E%E7%8E%B0/</link><pubDate>Tue, 16 May 2023 21:00:00 +0800</pubDate><guid>https://luanrz.github.io/posts/%E4%B8%AD%E9%97%B4%E4%BB%B6/redis%E5%88%86%E5%B8%83%E5%BC%8Fid%E5%AE%9E%E7%8E%B0/</guid><description>&lt;p&gt;分布式ID的实现方式有多种：UUID、雪花算法、数据库自增ID、数据库序列（Oracle）、Redis等等。下面将以Redis为例实现一个简单的分布式ID。&lt;/p&gt;</description></item><item><title>Redis分布式锁简介</title><link>https://luanrz.github.io/posts/%E4%B8%AD%E9%97%B4%E4%BB%B6/redis%E5%88%86%E5%B8%83%E5%BC%8F%E9%94%81%E7%AE%80%E4%BB%8B/</link><pubDate>Fri, 10 Mar 2023 11:01:21 +0800</pubDate><guid>https://luanrz.github.io/posts/%E4%B8%AD%E9%97%B4%E4%BB%B6/redis%E5%88%86%E5%B8%83%E5%BC%8F%E9%94%81%E7%AE%80%E4%BB%8B/</guid><description>&lt;p&gt;锁是实现安全访问共享资源的一种同步机制。在单机环境下，Java原生锁可以很好地支持多线程竞争资源时的安全性，分布式环境就行不通了，因为不同的JVM无法共享锁资源。&lt;/p&gt;</description></item><item><title>Redis缓存：分布式缓存配置与多级缓存简介</title><link>https://luanrz.github.io/posts/%E4%B8%AD%E9%97%B4%E4%BB%B6/redis%E7%BC%93%E5%AD%98%E5%88%86%E5%B8%83%E5%BC%8F%E7%BC%93%E5%AD%98%E9%85%8D%E7%BD%AE%E4%B8%8E%E5%A4%9A%E7%BA%A7%E7%BC%93%E5%AD%98%E7%AE%80%E4%BB%8B/</link><pubDate>Sun, 19 Feb 2023 22:06:40 +0800</pubDate><guid>https://luanrz.github.io/posts/%E4%B8%AD%E9%97%B4%E4%BB%B6/redis%E7%BC%93%E5%AD%98%E5%88%86%E5%B8%83%E5%BC%8F%E7%BC%93%E5%AD%98%E9%85%8D%E7%BD%AE%E4%B8%8E%E5%A4%9A%E7%BA%A7%E7%BC%93%E5%AD%98%E7%AE%80%E4%BB%8B/</guid><description>&lt;p&gt;分布式缓存与多级缓存可以实现服务的高性能和高可用。下面将介绍一下分布式缓存中主从集群与哨兵集群的配置，与多级缓存的基本场景。&lt;/p&gt;
&lt;h2 id="一分布式缓存配置"&gt;一、分布式缓存配置&lt;/h2&gt;
&lt;h3 id="一主从集群"&gt;（一）主从集群&lt;/h3&gt;
&lt;p&gt;主从集群一般由一个负责写的主节点和多个负责读的从节点组成。下面将演示在本机搭建一个三节点的主从集群，它们的端口号分别为：7001、7002、7003，其中，7001为主节点。&lt;/p&gt;</description></item></channel></rss>