<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>潘锦的空间 &#187; 高可用</title>
	<atom:link href="https://www.phppan.com/tag/%e9%ab%98%e5%8f%af%e7%94%a8/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.phppan.com</link>
	<description>SaaS SaaS架构 团队管理 技术管理 技术架构 PHP 内核 扩展 项目管理</description>
	<lastBuildDate>Sat, 04 Apr 2026 01:19:58 +0000</lastBuildDate>
	<language>zh-CN</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=3.9.40</generator>
	<item>
		<title>这句话 DeepSeek 一定和你说过</title>
		<link>https://www.phppan.com/2025/02/deepseek-ai/</link>
		<comments>https://www.phppan.com/2025/02/deepseek-ai/#comments</comments>
		<pubDate>Thu, 06 Feb 2025 13:17:57 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[架构和远方]]></category>
		<category><![CDATA[DeepSeek]]></category>
		<category><![CDATA[高可用]]></category>

		<guid isPermaLink="false">https://www.phppan.com/?p=2329</guid>
		<description><![CDATA[春节期间，DeepSeek 的相关信息铺天盖地。从应用场景到实战演练，从论文解读到原理分析，从行业发展到国际局 [&#8230;]]]></description>
				<content:encoded><![CDATA[<p style="color: #000000;" data-tool="mdnice编辑器">春节期间，DeepSeek 的相关信息铺天盖地。从应用场景到实战演练，从论文解读到原理分析，从行业发展到国际局势，各路神仙各有观点，应接不暇，都看不完了。</p>
<p style="color: #000000;" data-tool="mdnice编辑器">我自己也深度使用了，包括文章撰写和代码输出，说实话，思考的过程确实惊艳了我。它的思考逻辑比我更完善，推导路径也更显性。</p>
<p style="color: #000000;" data-tool="mdnice编辑器">但今天我们聊的不是这些「高光时刻」，而是我们在实际使用过程中常常遇到的不可用场景：</p>
<blockquote style="color: var(--weui-fg-1);"><p><span style="font-weight: bold; color: #0e88eb;">“服务器繁忙，请稍后再试。”</span></p></blockquote>
<p style="color: #000000;" data-tool="mdnice编辑器">是的，DeepSeek 的繁忙（也可以叫故障？）提示几乎成了高频词。无论是免费用户还是付费 API 调用者，都可能在关键时刻遭遇「空文本返回」、「响应超时」、「重试多次仍异常」等问题。</p>
<h1 style="color: #000000;" data-tool="mdnice编辑器"><span style="font-weight: bold; color: #0e8aeb;">1. DeepSeek 的可用性表现</span></h1>
<p style="color: #000000;" data-tool="mdnice编辑器">首先我们看一下官方的记录： https://status.deepseek.com/</p>
<p style="color: #000000;" data-tool="mdnice编辑器">总结起来如下：</p>
<ul class="list-paddingleft-1" style="color: #000000;">
<li>
<section style="color: #010101;"><strong style="color: #0e88eb;">网页/API 性能异常（Web/API Degraded Performance）</strong></section>
<ul class="list-paddingleft-1">
<li>
<section style="color: #010101;">持续时间： 2025 年 1 月 27 日至今（2 月 5 日仍在监控中）</section>
</li>
<li>
<section style="color: #010101;">影响范围： API 和网页服务同时出现性能下降，部分用户请求超时或失败。从实际使用体验来看，基本属于不可用的状态了，但是官方的状态还是可用，仅性能问题，这里的状态指标和实际还是有一些出入。</section>
</li>
</ul>
</li>
<li>
<section style="color: #010101;"><strong style="color: #0e88eb;">API 持续故障（Major outage/Partial outage）</strong>：</section>
<ul class="list-paddingleft-1">
<li>
<section style="color: #010101;">持续时间：2025 年 1 月 27 日到 2 月 5 日</section>
</li>
<li>
<section style="color: #010101;">影响范围：持续影响 API 调用，故障持续时间较长，<strong style="color: #0e88eb;">作为一个付费的能力，这是不合格的</strong>。</section>
</li>
</ul>
</li>
<li>
<section style="color: #010101;"><strong style="color: #0e88eb;">网页对话服务不间断故障</strong>：</section>
<ul class="list-paddingleft-1">
<li>
<section style="color: #010101;">持续时间：2025 年 1 月 27 日到 1 月 31 日</section>
</li>
<li>
<section style="color: #010101;">影响范围：持续影响网页用户的使用，在用户的反馈中</section>
</li>
</ul>
</li>
</ul>
<p style="color: #000000;" data-tool="mdnice编辑器">从结果来看，<strong style="color: #0e88eb;">DeepSeek 还没有做好应对海量用户的情况，不管是从资源部署，还是工程建设方面，都不是一个合格的状态</strong>。</p>
<p style="color: #000000;" data-tool="mdnice编辑器">在写这篇文章的时候，除了第一次正常返回，后续都是「服务器繁忙，请稍后再试。」 如下图所示：</p>
<figure style="color: #000000;" data-tool="mdnice编辑器"><img class="rich_pages wxw-img" src="https://mmbiz.qpic.cn/sz_mmbiz_png/suE0Ye6UeMwbiaEzryuCanpPukFxaSeTecKvshyV5nsHibn90E76RZAB8Sq4pNYWurVooXQ1bUGH7NLmnPWrvLfw/640?wx_fmt=png&amp;from=appmsg&amp;tp=webp&amp;wxfrom=5&amp;wx_lazy=1&amp;wx_co=1" alt="图片" crossorigin="anonymous" data-src="https://mmbiz.qpic.cn/sz_mmbiz_png/suE0Ye6UeMwbiaEzryuCanpPukFxaSeTecKvshyV5nsHibn90E76RZAB8Sq4pNYWurVooXQ1bUGH7NLmnPWrvLfw/640?wx_fmt=png&amp;from=appmsg" data-ratio="0.42005420054200543" data-type="png" data-w="738" data-imgfileid="100000825" data-original-style="display: block;margin-top: 0px;margin-right: auto;margin-bottom: 0px;margin-left: auto;max-width: 100%;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;object-fit: fill;box-shadow: rgb(133, 161, 201) 0px 0px 5px 0px;" data-index="1" data-fail="0" /></figure>
<p style="color: #000000;" data-tool="mdnice编辑器">从用户能看到的表象来看，自 2025 年 1 月底至 2 月初，DeepSeek 多次出现服务中断：</p>
<ul class="list-paddingleft-1" style="color: #000000;">
<li>
<section style="color: #010101;"><strong style="color: #0e88eb;">深度思考与联网搜索功能失效</strong>：用户使用核心功能时频繁提示「技术原因暂不可用」，仅保留基础对话能力。</section>
</li>
<li>
<section style="color: #010101;"><strong style="color: #0e88eb;">API 服务波动</strong>：付费用户调用接口时返回空文本或延迟异常，甚至因「服务器资源紧张」暂停充值。</section>
</li>
<li>
<section style="color: #010101;"><strong style="color: #0e88eb;">注册与登录拥堵</strong>：因恶意攻击导致注册功能瘫痪。</section>
</li>
</ul>
<p style="color: #000000;" data-tool="mdnice编辑器">DeepSeek 官方将问题归因于<strong style="color: #0e88eb;">突发流量、系统升级适配、底层基础设施波动</strong>，并强调「稳定性是首要任务」。但用户更直观的感受是：<strong style="color: #0e88eb;">服务可用性不足，容错机制缺失</strong>。</p>
<h1 style="color: #000000;" data-tool="mdnice编辑器"><span style="font-weight: bold; color: #0e8aeb;">2. AIGC 产品和互联网产品的天然差异</span></h1>
<p style="color: #000000;" data-tool="mdnice编辑器">DeepSeek 作为一个 AIGC 的产品，其和传统的互联网产品就存在天然的差异：</p>
<h2 style="color: #000000;" data-tool="mdnice编辑器"><span style="font-weight: bold; color: #0e8aeb;">2.1 响应时间与计算资源消耗</span></h2>
<p style="color: #000000;" data-tool="mdnice编辑器"><strong style="color: #0e88eb;">传统互联网产品</strong></p>
<ul class="list-paddingleft-1" style="color: #000000;">
<li>
<section style="color: #010101;">主要依赖数据库查询、预定义的业务逻辑和缓存，响应时间通常较短，且可预测。</section>
</li>
<li>
<section style="color: #010101;">计算资源需求相对稳定，系统可扩展性较强。</section>
</li>
</ul>
<p style="color: #000000;" data-tool="mdnice编辑器"><strong style="color: #0e88eb;">AIGC 产品</strong></p>
<ul class="list-paddingleft-1" style="color: #000000;">
<li>
<section style="color: #010101;">依赖深度学习模型进行推理，计算量大，响应时间较传统产品长，且可能因模型复杂度、输入长度等因素波动。</section>
</li>
<li>
<section style="color: #010101;">需要强大的 GPU 计算资源，服务器负载高，可能导致响应延迟或服务不可用。</section>
</li>
<li>
<section style="color: #010101;">可能需要异步处理或流式输出（如 ChatGPT 的逐字生成），以改善用户体验。</section>
</li>
</ul>
<h2 style="color: #000000;" data-tool="mdnice编辑器"><span style="font-weight: bold; color: #0e8aeb;">2.2 可靠性与稳定性</span></h2>
<p style="color: #000000;" data-tool="mdnice编辑器"><strong style="color: #0e88eb;">传统互联网产品</strong></p>
<ul class="list-paddingleft-1" style="color: #000000;">
<li>
<section style="color: #010101;">由于功能是规则驱动的，系统行为可预测，崩溃或异常情况较少。</section>
</li>
<li>
<section style="color: #010101;">依赖负载均衡、CDN、数据库复制等机制，保障高可用性（通常可达 99.99% 以上）。</section>
</li>
</ul>
<p style="color: #000000;" data-tool="mdnice编辑器"><strong style="color: #0e88eb;">AIGC 产品</strong></p>
<ul class="list-paddingleft-1" style="color: #000000;">
<li>
<section style="color: #010101;">生成式AI的<strong style="color: #0e88eb;">输出不确定</strong>，在不同运行环境、不同模型版本下可能产生不同结果，影响用户体验的一致性。</section>
</li>
<li>
<section style="color: #010101;">可能受到<strong style="color: #0e88eb;">模型崩溃、推理失败、内存爆炸、API 速率限制</strong>等问题的影响，导致服务不可用或部分功能异常。</section>
</li>
<li>
<section style="color: #010101;">需要额外的<strong style="color: #0e88eb;">故障检测、自动重试、回退机制</strong>（如降级到预定义模板或缓存内容）来提升系统可用性。</section>
</li>
</ul>
<h2 style="color: #000000;" data-tool="mdnice编辑器"><span style="font-weight: bold; color: #0e8aeb;">2.3 可控性与一致性</span></h2>
<p style="color: #000000;" data-tool="mdnice编辑器"><strong style="color: #0e88eb;">传统互联网产品</strong></p>
<ul class="list-paddingleft-1" style="color: #000000;">
<li>
<section style="color: #010101;">业务逻辑是<strong style="color: #0e88eb;">确定性</strong>的，相同输入通常会产生相同输出，保证用户体验的一致性。虽然有「千人千面」的算法，但是其本质上是可控的</section>
</li>
<li>
<section style="color: #010101;">开发人员可以精确控制系统行为，便于调试和优化。</section>
</li>
</ul>
<p style="color: #000000;" data-tool="mdnice编辑器"><strong style="color: #0e88eb;">AIGC 产品</strong></p>
<ul class="list-paddingleft-1" style="color: #000000;">
<li>
<section style="color: #010101;">AI 生成内容的<strong style="color: #0e88eb;">不可预测性</strong>导致相同输入可能产生不同的输出，影响<strong style="color: #0e88eb;">可控性</strong>和<strong style="color: #0e88eb;">一致性</strong>。</section>
</li>
<li>
<section style="color: #010101;">需要<strong style="color: #0e88eb;">温度参数（Temperature）、Top-K 采样</strong>等技术来调整生成稳定性，但仍无法完全保证一致性。</section>
</li>
<li>
<section style="color: #010101;">可能需要<strong style="color: #0e88eb;">缓存机制、提示词优化（Prompt Engineering）或微调模型</strong>来提高可控性。</section>
</li>
</ul>
<h2 style="color: #000000;" data-tool="mdnice编辑器"><span style="font-weight: bold; color: #0e8aeb;">2.4 可扩展性</span></h2>
<p style="color: #000000;" data-tool="mdnice编辑器"><strong style="color: #0e88eb;">传统互联网产品</strong></p>
<ul class="list-paddingleft-1" style="color: #000000;">
<li>
<section style="color: #010101;">主要依赖水平扩展（如增加服务器、数据库分片）来提升性能。</section>
</li>
<li>
<section style="color: #010101;">由于业务逻辑固定，扩展后的系统可保持较高的一致性。</section>
</li>
</ul>
<p style="color: #000000;" data-tool="mdnice编辑器"><strong style="color: #0e88eb;">AIGC 产品</strong></p>
<ul class="list-paddingleft-1" style="color: #000000;">
<li>
<section style="color: #010101;">由于<strong style="color: #0e88eb;">深度学习推理的计算密集型特性</strong>，水平扩展难度较高，需要依赖专用硬件（如 GPU）。</section>
</li>
<li>
<section style="color: #010101;">高并发场景下，可能需要<strong style="color: #0e88eb;">分布式推理、模型量化、边缘计算</strong>等优化策略来提升可扩展性。</section>
</li>
<li>
<section style="color: #010101;">可能采用<strong style="color: #0e88eb;">多级缓存（如存储常见问题的预生成答案，在产品中是否能使用待确认）</strong>来减少推理开销。</section>
</li>
</ul>
<h2 style="color: #000000;" data-tool="mdnice编辑器"><span style="font-weight: bold; color: #0e8aeb;">2.5 错误处理与恢复机制</span></h2>
<p style="color: #000000;" data-tool="mdnice编辑器"><strong style="color: #0e88eb;">传统互联网产品</strong></p>
<ul class="list-paddingleft-1" style="color: #000000;">
<li>
<section style="color: #010101;">由于逻辑清晰，错误通常可以通过<strong style="color: #0e88eb;">日志分析、异常处理机制</strong>快速排查和修复。</section>
</li>
<li>
<section style="color: #010101;">具备<strong style="color: #0e88eb;">回滚机制</strong>，当系统发生故障时，可以回退到稳定版本。</section>
</li>
</ul>
<p style="color: #000000;" data-tool="mdnice编辑器"><strong style="color: #0e88eb;">AIGC 产品</strong></p>
<ul class="list-paddingleft-1" style="color: #000000;">
<li>
<section style="color: #010101;">由于模型的<strong style="color: #0e88eb;">黑箱特性</strong>，错误较难追踪。</section>
</li>
<li>
<section style="color: #010101;">可能需要<strong style="color: #0e88eb;">人机协同（Human-in-the-loop）</strong>机制，让人工审核关键任务的生成内容。</section>
</li>
<li>
<section style="color: #010101;">需要<strong style="color: #0e88eb;">自动调整机制（如 RAG，Retrieval-Augmented Generation）</strong>，结合外部知识库提高准确性。</section>
</li>
</ul>
<h2 style="color: #000000;" data-tool="mdnice编辑器"><span style="font-weight: bold; color: #0e8aeb;">2.6 可维护性与升级</span></h2>
<p style="color: #000000;" data-tool="mdnice编辑器"><strong style="color: #0e88eb;">传统互联网产品</strong></p>
<ul class="list-paddingleft-1" style="color: #000000;">
<li>
<section style="color: #010101;">代码和数据库可以<strong style="color: #0e88eb;">模块化升级</strong>，通常只影响部分功能。</section>
</li>
<li>
<section style="color: #010101;">版本管理清晰，可通过<strong style="color: #0e88eb;">灰度发布、A/B 测试</strong>等方式进行平滑更新。</section>
</li>
</ul>
<p style="color: #000000;" data-tool="mdnice编辑器"><strong style="color: #0e88eb;">AIGC 产品</strong></p>
<ul class="list-paddingleft-1" style="color: #000000;">
<li>
<section style="color: #010101;"><strong style="color: #0e88eb;">模型升级可能导致行为变化</strong>，新模型可能生成完全不同的内容，影响可用性。</section>
</li>
<li>
<section style="color: #010101;">需要<strong style="color: #0e88eb;">持续微调（Fine-tuning）或增强检索（RAG）</strong>，以适应新需求。</section>
</li>
<li>
<section style="color: #010101;">可能需要<strong style="color: #0e88eb;">模型版本管理（如 OpenAI API 的 GPT-4.0 vs. GPT-3.5）</strong>，让用户可选择不同模型版本，以保证兼容性。</section>
</li>
</ul>
<p style="color: #000000;" data-tool="mdnice编辑器">AIGC 产品在系统可用性上面临更大的挑战，主要在于<strong style="color: #0e88eb;">响应时间、可靠性、可控性和错误处理</strong>等方面。为了提升可用性，需要结合<strong style="color: #0e88eb;">缓存优化、模型优化、人工审核、错误监测、版本管理</strong>等策略，从而确保系统的高效性和稳定性。</p>
<h1 style="color: #000000;" data-tool="mdnice编辑器"><span style="font-weight: bold; color: #0e8aeb;">3. 借鉴传统互联网产品的可用性策略</span></h1>
<p style="color: #000000;" data-tool="mdnice编辑器">在面对 DeepSeek 这样 AIGC 产品的可用性挑战时，我们可以借鉴传统互联网产品的高可用性策略。以下是三种核心策略：隔离、限流和弹性扩展，它们对于提升整体服务的稳定性和可靠性至关重要。</p>
<h2 style="color: #000000;" data-tool="mdnice编辑器"><span style="font-weight: bold; color: #0e8aeb;">3.1 隔离</span></h2>
<p style="color: #000000;" data-tool="mdnice编辑器"><strong style="color: #0e88eb;">隔离</strong> 是指将不同类型的流量、服务和资源进行物理或逻辑上的分离，以减少单点故障的影响，提高系统的稳定性。</p>
<p style="color: #000000;" data-tool="mdnice编辑器"><strong style="color: #0e88eb;">（1）传统互联网产品的隔离策略</strong></p>
<ul class="list-paddingleft-1" style="color: #000000;">
<li>
<section style="color: #010101;"><strong style="color: #0e88eb;">数据库读写分离</strong>：使用主从数据库架构，将读请求和写请求分离，提高数据库吞吐能力。</section>
</li>
<li>
<section style="color: #010101;"><strong style="color: #0e88eb;">微服务架构</strong>：将不同的业务模块拆分为独立的微服务，避免单个模块的故障影响整个系统。</section>
</li>
<li>
<section style="color: #010101;"><strong style="color: #0e88eb;">多数据中心部署</strong>：在不同地域部署多个数据中心，确保某个数据中心故障时，服务仍然可用。</section>
</li>
</ul>
<p style="color: #000000;" data-tool="mdnice编辑器"><strong style="color: #0e88eb;">（2）AIGC 产品中的隔离策略</strong></p>
<ul class="list-paddingleft-1" style="color: #000000;">
<li>
<section style="color: #010101;"><strong style="color: #0e88eb;">模型推理服务隔离</strong>：不同的 AI 任务（如文本生成、代码补全、图像生成）使用独立的推理服务，以避免相互影响。</section>
</li>
<li>
<section style="color: #010101;"><strong style="color: #0e88eb;">缓存与实时推理分离</strong>：对于常见问题或高频请求，使用缓存存储预生成的答案，减少对 AI 推理的依赖。</section>
</li>
<li>
<section style="color: #010101;"><strong style="color: #0e88eb;">免费用户和付费用户隔离</strong>：将高优先级的计算资源分配给付费用户，确保他们在高负载时仍能获得稳定的服务。</section>
</li>
<li>
<section style="color: #010101;"><strong style="color: #0e88eb;">企业用户和个人用户隔离</strong>：针对企业用户的部署资源和个人用户的资源做隔离，甚至对于企业用户做多个隔离泳道。</section>
</li>
</ul>
<p style="color: #000000;" data-tool="mdnice编辑器"><strong style="color: #0e88eb;">（3）隔离策略解决的问题</strong></p>
<ul class="list-paddingleft-1" style="color: #000000;">
<li>
<section style="color: #010101;"><strong style="color: #0e88eb;">减少单点故障</strong>，避免某个服务异常影响整个系统。</section>
</li>
<li>
<section style="color: #010101;"><strong style="color: #0e88eb;">优化资源利用</strong>，确保高优先级任务不会被低优先级任务拖累。</section>
</li>
<li>
<section style="color: #010101;"><strong style="color: #0e88eb;">提高系统韧性</strong>，即使部分服务故障，核心功能仍可正常运行。</section>
</li>
</ul>
<p style="color: #000000;" data-tool="mdnice编辑器"><strong style="color: #0e88eb;">（4）隔离策略的注意事项</strong></p>
<ul class="list-paddingleft-1" style="color: #000000;">
<li>
<section style="color: #010101;"><strong style="color: #0e88eb;">隔离的粒度需要合理设计</strong>，过度拆分可能导致管理复杂度上升，系统之间的通信成本增加。</section>
</li>
<li>
<section style="color: #010101;"><strong style="color: #0e88eb;">监控与调度</strong>，确保不同隔离层的资源调度合理，避免出现某些区域资源过载，而其他区域资源空闲的情况。</section>
</li>
</ul>
<h2 style="color: #000000;" data-tool="mdnice编辑器"><span style="font-weight: bold; color: #0e8aeb;">3.2 限流</span></h2>
<p style="color: #000000;" data-tool="mdnice编辑器"><strong style="color: #0e88eb;">限流</strong> 是指在高并发情况下，对请求进行限制，以防止系统过载，保障关键用户和服务的稳定性。</p>
<p style="color: #000000;" data-tool="mdnice编辑器"><strong style="color: #0e88eb;">（1）传统互联网产品的限流策略</strong></p>
<ul class="list-paddingleft-1" style="color: #000000;">
<li>
<section style="color: #010101;"><strong style="color: #0e88eb;">令牌桶/漏桶算法</strong>：限制请求速率，确保系统不会被短时间内的流量高峰压垮。</section>
</li>
<li>
<section style="color: #010101;"><strong style="color: #0e88eb;">IP 级限流</strong>：对单个 IP 地址的请求频率进行限制，防止恶意爬虫或 DDoS 攻击。</section>
</li>
<li>
<section style="color: #010101;"><strong style="color: #0e88eb;">用户级限流</strong>：根据用户级别（普通用户、VIP 用户）设置不同的 QPS 上限。</section>
</li>
</ul>
<p style="color: #000000;" data-tool="mdnice编辑器"><strong style="color: #0e88eb;">（2）AIGC 产品中的限流策略</strong></p>
<ul class="list-paddingleft-1" style="color: #000000;">
<li>
<section style="color: #010101;"><strong style="color: #0e88eb;">API 访问限流</strong>：对于 DeepSeek 这样的 AI API，限制每个用户的最大请求频率，防止个别用户占用过多计算资源。以及对于 IP 的访问限流。</section>
</li>
<li>
<section style="color: #010101;"><strong style="color: #0e88eb;">任务队列管理</strong>：对于高计算消耗的任务（如长文本生成、复杂代码推理），采用任务排队机制，避免瞬时请求超载。排队机制在文生图的场景下属于通用方案，以 MJ 为例，其商业模式就在于任务数，任务能力的不同，底层还是资源的不同。</section>
</li>
<li>
<section style="color: #010101;"><strong style="color: #0e88eb;">用户限流</strong>：以某种代币的方式发放给免费用户，使其有一定的使用次数限制，增加浏览器指纹等用户级的限制，减少用户的并发使用情况，以及增加对话数的限制等。</section>
</li>
<li>
<section style="color: #010101;"><strong style="color: #0e88eb;">动态限流</strong>：根据服务器的当前负载自动调整限流策略，在资源紧张时降低 QPS，在资源充足时放宽限制。</section>
</li>
</ul>
<p style="color: #000000;" data-tool="mdnice编辑器"><strong style="color: #0e88eb;">（3）限流策略解决的问题</strong></p>
<ul class="list-paddingleft-1" style="color: #000000;">
<li>
<section style="color: #010101;"><strong style="color: #0e88eb;">防止系统崩溃</strong>，确保 AI 服务在高并发情况下仍能稳定运行。</section>
</li>
<li>
<section style="color: #010101;"><strong style="color: #0e88eb;">优化资源分配</strong>，优先保证高价值用户的服务体验。</section>
</li>
<li>
<section style="color: #010101;"><strong style="color: #0e88eb;">抵御恶意攻击</strong>，防止 DDoS 攻击或恶意爬取 API 造成的资源滥用。</section>
</li>
</ul>
<p style="color: #000000;" data-tool="mdnice编辑器"><strong style="color: #0e88eb;">（4）限流策略的注意事项</strong></p>
<ul class="list-paddingleft-1" style="color: #000000;">
<li>
<section style="color: #010101;"><strong style="color: #0e88eb;">限流策略需要动态调整</strong>，不能一刀切，否则可能导致正常用户体验下降。</section>
</li>
<li>
<section style="color: #010101;"><strong style="color: #0e88eb;">需要提供合理的错误反馈</strong>，例如「当前请求过多，请稍后重试」而不是简单的「服务器错误」。</section>
</li>
<li>
<section style="color: #010101;"><strong style="color: #0e88eb;">与缓存结合使用</strong>，对于常见请求，优先返回缓存结果，减少对 AI 推理的调用次数。这个点在产品层面需要考虑，确实，和传统互联网产品相比，缓存在 AIGC 产品中的使用需要更谨慎一些。</section>
</li>
</ul>
<h2 style="color: #000000;" data-tool="mdnice编辑器"><span style="font-weight: bold; color: #0e8aeb;">3.3. 弹性扩展</span></h2>
<p style="color: #000000;" data-tool="mdnice编辑器"><strong style="color: #0e88eb;">弹性扩展</strong> 是指根据实际流量动态调整计算资源，以提高系统的可用性和响应速度。</p>
<p style="color: #000000;" data-tool="mdnice编辑器"><strong style="color: #0e88eb;">（1）传统互联网产品的弹性扩展策略</strong></p>
<ul class="list-paddingleft-1" style="color: #000000;">
<li>
<section style="color: #010101;"><strong style="color: #0e88eb;">自动扩容</strong>：使用云计算（如 AWS Auto Scaling、Kubernetes HPA）自动增加或减少服务器实例。</section>
</li>
<li>
<section style="color: #010101;"><strong style="color: #0e88eb;">负载均衡</strong>：使用 Nginx、CDN、反向代理等技术，将流量均匀分配到不同的服务器节点上。</section>
</li>
<li>
<section style="color: #010101;"><strong style="color: #0e88eb;">冷/热数据分离</strong>：将访问频率高的数据放入高速缓存，减少数据库查询压力。</section>
</li>
</ul>
<p style="color: #000000;" data-tool="mdnice编辑器"><strong style="color: #0e88eb;">（2）AIGC 产品中的弹性扩展策略</strong></p>
<ul class="list-paddingleft-1" style="color: #000000;">
<li>
<section style="color: #010101;"><strong style="color: #0e88eb;">GPU 资源动态调度</strong>：由于 AI 推理高度依赖 GPU，可以采用动态 GPU 分配策略，根据请求量调整 GPU 负载。</section>
</li>
<li>
<section style="color: #010101;"><strong style="color: #0e88eb;">多模型并行推理</strong>：对于高负载场景，可以部署多个副本的 AI 模型，采用负载均衡策略分配请求。</section>
</li>
<li>
<section style="color: #010101;"><strong style="color: #0e88eb;">推理任务分批处理</strong>：对于大规模生成任务，采用批处理方式，提高计算效率，减少单次推理的成本。</section>
</li>
</ul>
<p style="color: #000000;" data-tool="mdnice编辑器"><strong style="color: #0e88eb;">（3）弹性扩展策略解决的问题</strong></p>
<ul class="list-paddingleft-1" style="color: #000000;">
<li>
<section style="color: #010101;"><strong style="color: #0e88eb;">避免资源浪费</strong>，在低流量时减少计算资源，降低运营成本。</section>
</li>
<li>
<section style="color: #010101;"><strong style="color: #0e88eb;">提升系统吞吐能力</strong>，在高流量时快速扩展计算能力，确保服务稳定。</section>
</li>
<li>
<section style="color: #010101;"><strong style="color: #0e88eb;">提升响应速度</strong>，减少高并发情况下的请求排队时间，提高用户体验。</section>
</li>
</ul>
<p style="color: #000000;" data-tool="mdnice编辑器"><strong style="color: #0e88eb;">（4）弹性扩展策略的注意事项</strong></p>
<ul class="list-paddingleft-1" style="color: #000000;">
<li>
<section style="color: #010101;"><strong style="color: #0e88eb;">扩容速度需要优化</strong>，如果扩容响应过慢，可能导致短时间内大量请求失败。</section>
</li>
<li>
<section style="color: #010101;"><strong style="color: #0e88eb;">成本控制</strong>，GPU 计算资源昂贵，需要权衡服务质量与成本。</section>
</li>
<li>
<section style="color: #010101;"><strong style="color: #0e88eb;">监控与预警</strong>，需要实时监控系统负载，提前预测流量高峰，避免突发情况导致系统崩溃。</section>
</li>
</ul>
<p style="color: #000000;" data-tool="mdnice编辑器">AIGC 更多的问题还是算力资源的问题，从 DeepSeek 的服务器 IP 来看，其使用的是华为云，后端推理算力不确定是哪家的。基于多云的弹性调度是一个可以考虑的方案，当然，前提是成本能够扛得住。</p>
<h1 style="color: #000000;" data-tool="mdnice编辑器"><span style="font-weight: bold; color: #0e8aeb;">4. 从故障看 AIGC 可用性策略的四大核心矛盾</span></h1>
<ol class="list-paddingleft-1" style="color: #000000;">
<li>
<section style="color: #010101;">
<p style="color: #000000;"><strong style="color: #0e88eb;">算力需求与资源调度的失衡</strong><br />
AIGC 模型的推理成本极高。当用户量激增或遭遇攻击时，<strong style="color: #0e88eb;">弹性伸缩能力不足</strong>可能直接导致服务崩溃。</p>
</section>
</li>
<li>
<section style="color: #010101;">
<p style="color: #000000;"><strong style="color: #0e88eb;">功能复杂度与稳定性的博弈</strong><br />
DeepSeek 的「深度思考」依赖多模态数据处理和强化学习技术，但功能越复杂，系统耦合性越高，单点故障风险越大。</p>
</section>
</li>
<li>
<section style="color: #010101;">
<p style="color: #000000;"><strong style="color: #0e88eb;">用户预期与容灾能力的落差</strong><br />
用户对 AIGC 的期待是「类人级响应」，但实际服务常因网络抖动、模型加载延迟等问题降级为「机械式回复」。</p>
</section>
</li>
<li>
<section style="color: #010101;">
<p style="color: #000000;"><strong style="color: #0e88eb;">商业化压力与技术投入的冲突</strong><br />
尽管 DeepSeek 登顶多国应用商店榜单，但其快速扩张可能透支了技术团队的运维能力，导致故障频发后被迫暂停 API 充值。</p>
</section>
</li>
</ol>
<p style="color: #000000;" data-tool="mdnice编辑器">DeepSeek 的故障并非个例，而是 AIGC 行业集体面临的挑战。从技术角度看，<strong style="color: #0e88eb;">模型能力与系统稳定性需同步进化</strong>；从用户角度看，<strong style="color: #0e88eb;">容忍度与预期管理同样关键</strong>。</p>
<p style="color: #000000;" data-tool="mdnice编辑器">未来，AIGC 服务的竞争不仅是「谁更聪明」，更是「谁更可靠」，特别是在企业应用的场景。毕竟，再惊艳的思考过程，若总以「服务器繁忙」收场，终将消磨用户的耐心与信任。</p>
<p style="color: #000000;" data-tool="mdnice编辑器">以上。</p>
]]></content:encoded>
			<wfw:commentRss>https://www.phppan.com/2025/02/deepseek-ai/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>数据集合类系统如何架构</title>
		<link>https://www.phppan.com/2015/05/data-collections-systems-architecture/</link>
		<comments>https://www.phppan.com/2015/05/data-collections-systems-architecture/#comments</comments>
		<pubDate>Sat, 09 May 2015 17:00:11 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[程序相关]]></category>
		<category><![CDATA[数据集合]]></category>
		<category><![CDATA[架构]]></category>
		<category><![CDATA[系统架构]]></category>
		<category><![CDATA[高可用]]></category>

		<guid isPermaLink="false">http://www.phppan.com/?p=1926</guid>
		<description><![CDATA[数据集合类系统如何架构 以下内容来源于QCon某高可用架构群聊天记录整理 如果携程网想把旅游信息展示到另一平台 [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>数据集合类系统如何架构</p>
<p>以下内容来源于QCon某高可用架构群聊天记录整理</p>
<p>如果携程网想把旅游信息展示到另一平台上 平台和他们的系统数据对接，pull好一些还是post好一些？或者说一个系统只是把好多其他商家的数据集合展示到统一的系统上，这样的系统一般如何架构？</p>
<p>先回答第一个问题：数据对接是pull好一些还是post好一些，这里需要根据实际业务做权衡，如果平台系统很大部分是通过聚合第三方数据再展示，那么比较推荐让第三方post数据，自己设计统一数据规则接口。这种情况，需要考虑自身服务的稳定性了，预防第三方误调用，击垮自身系统。如果只有小部分内容聚合第三方，那就pull，比较好保证自己系统稳定性，不过最终还得把所有的数据转换成自己格式，需要自己开发团队做这块工作。</p>
<p>相比较而言，post时效性高，数据交互少，如果系统会需要各个源的信息，最终也不会只是展示那么简单。如果使用post方案，则需要在接入，数据，读取等方面做隔离，在接入使用mq可以提高吞吐，在读的时候用Cache抗。并且在前期需要考虑好数据存储和数据的量级，因为是第三方的数据，在存储的扩展性方面要有比较好的方案。</p>
<p>最终落地的方案可能是：</p>
<p>按业务隔离，不同的业务相互不影响，拆分子系统；<br />
使用redis和kafka保障高性能，kafka主要一方面用到日志上 一方面用到缓解数据库并发上；<br />
使用nginx和lvs保障高可用；<br />
在后期所有数据进hbase然后用storm做数据流处理和分析</p>
<p>以上这些并不需要一次性做到位，不要过早优化，只需要有一些大的原则，比如隔离，扩展等。小系统会随着业务慢慢演变，最终会变成大系统。在演变的过程中，可能会需要读写分离、业务分布式，分服务，架构就是在这样演变的路上成长起来的。</p>
]]></content:encoded>
			<wfw:commentRss>https://www.phppan.com/2015/05/data-collections-systems-architecture/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
