<?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 Leanku</title>
    <link>https://blog.leanku.com/tags/%E6%B3%A8%E5%86%8C%E4%B8%AD%E5%BF%83/</link>
    <description>Recent content in 注册中心 on Leanku</description>
    <image>
      <url>https://blog.leanku.com/papermod-cover.png</url>
      <link>https://blog.leanku.com/papermod-cover.png</link>
    </image>
    <generator>Hugo -- gohugo.io</generator>
    <lastBuildDate>Mon, 15 Sep 2025 20:46:01 +0800</lastBuildDate><atom:link href="https://blog.leanku.com/tags/%E6%B3%A8%E5%86%8C%E4%B8%AD%E5%BF%83/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>微服务治理-注册中心</title>
      <link>https://blog.leanku.com/post/microservice/%E5%BE%AE%E6%9C%8D%E5%8A%A1%E6%B2%BB%E7%90%86-%E6%B3%A8%E5%86%8C%E4%B8%AD%E5%BF%83/</link>
      <pubDate>Mon, 15 Sep 2025 20:46:01 +0800</pubDate>
      
      <guid>https://blog.leanku.com/post/microservice/%E5%BE%AE%E6%9C%8D%E5%8A%A1%E6%B2%BB%E7%90%86-%E6%B3%A8%E5%86%8C%E4%B8%AD%E5%BF%83/</guid>
      <description>微服务治理-注册中心 一、介绍 1.1 什么是注册中心 注册中心可以理解为：
整个微服务系统的“通讯录”或“服务目录”。
在单体应用中：
Web │ ▼ Controller │ ▼ Service │ ▼ Repository 所有模块都运行在同一个进程中，方法之间直接调用： $user = $this-&amp;gt;userService-&amp;gt;getUser($id);
开发者无需关心：
服务在哪里？ IP 是多少？ 端口是多少？ 因为它们都在同一个应用中。
而在微服务架构中：
User Service 10.0.0.10 │ Order Service ---------------- Product Service 10.0.0.11 10.0.0.12 现在 Order Service 想调用 User Service。
问题来了：Order Service 怎么知道 User Service 在哪里？
如果直接写 IP：虽然可以运行，但会产生很多问题。
1.2 为什么不能写死 IP？ 假设：今天：User Service 10.0.0.10
后面因为扩容：User Service 10.0.0.20 或者增加服务器：10.0.0.xxx
那么：
所有调用 User Service 的项目：都要修改配置。
到底调用哪一个?
于是：</description>
    </item>
    
  </channel>
</rss>
