<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Shawn Ding on Medium]]></title>
        <description><![CDATA[Stories by Shawn Ding on Medium]]></description>
        <link>https://medium.com/@shawnding?source=rss-fbb61c5a6e63------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*CraNfIv7SxtWkHoKk0Sr1w.jpeg</url>
            <title>Stories by Shawn Ding on Medium</title>
            <link>https://medium.com/@shawnding?source=rss-fbb61c5a6e63------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 05:55:21 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@shawnding/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Stop Should or Shouldn’t]]></title>
            <link>https://shawnding.medium.com/all-mental-pain-are-created-by-our-brain-618dd3247ad5?source=rss-fbb61c5a6e63------2</link>
            <guid isPermaLink="false">https://medium.com/p/618dd3247ad5</guid>
            <category><![CDATA[psychology]]></category>
            <category><![CDATA[mindfulness]]></category>
            <category><![CDATA[buddhism]]></category>
            <dc:creator><![CDATA[Shawn Ding]]></dc:creator>
            <pubDate>Sun, 08 Feb 2026 08:19:17 GMT</pubDate>
            <atom:updated>2026-02-08T08:25:48.084Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*chi1LbWFaJaqHPaU4ui2bw.png" /></figure><p>Pain in life comes in two types: physical pain and mental pain. Physical pain is easy to understand. Illness, injuries, accidents — that stuff is real, unavoidable, and part of being human.</p><p>Mental pain is different. It’s something our own brains create. It comes from clinging to certain belief we take for granted, even when they don’t match reality. To put it bluntly: all mental suffering is self-inflicted. By mental pain, I mean emotions like anger, sadness, fear, depression, anxiety — basically any emotion that makes you suffer.</p><p>A lot of people push back on this idea. They’ll say: “Someone just cut me off in traffic and almost crashed into me. Of course I’m angry. How is that my fault?”</p><p>Here’s my explanation: You’re angry because you’re holding onto a thought like this as your belief:</p><blockquote><em>“Drivers </em>should<em> follow the rules. They </em>should<em> respect others. They </em>shouldn’t<em> drive like idiots.”</em></blockquote><p>Now let’s compare that thought with reality. Do <em>all</em> drivers follow the rules?<br>Do <em>all</em> drivers respect others?</p><p>Obviously the answer is <em>No</em>. Some drivers are reckless. Some don’t care. Some are just bad at driving. Once you truly accept that reality, the question becomes: why cling so tightly to the idea that they <em>should</em> be different?</p><p>If you dig deep enough, you’ll notice a pattern: almost all mental suffering comes from hidden beliefs built around one word — <strong>“should.”</strong></p><p>That word shows up in many forms, but the core is the same. Some example:</p><ul><li>My husband <em>should</em> love me more and be more considerate.</li><li>My child <em>should</em> keep their room clean.</li><li>My kid <em>should</em> study more. Her grades <em>shouldn’t</em> be this bad.</li><li>I <em>shouldn’t</em> have ended up with such a disappointing life.</li></ul><p>The pattern looks like this:</p><ul><li>You have a belief about how things <em>should</em> be or <em>shouldn’t</em> be</li><li>You’re firmly convinced your opinion is reasonable and correct</li><li>Reality doesn’t match that opinion</li><li>You suffer from that.</li></ul><p>The key part is this mismatch between your thoughts and reality. When your thoughts clash with reality, who’s actually wrong? Reality — or you?</p><p>If something happened, then it happened. It’s the result of countless factors interacting in ways we can’t fully see. But we tend to notice only a small piece of the picture, then cling to our “should” or “shouldn’t”, as if reality made a mistake.</p><p>There’s a saying in Buddhism: <em>suffering comes from attachment.</em></p><p>Why do we get attached? Because our thoughts feel <strong>so real</strong>.</p><p>But remember these two things:</p><ul><li>If your thoughts don’t match objective reality, reality wins. Always.</li><li>The same event can be interpreted in completely different — even opposite — ways by different people.</li></ul><p>You can still hold to your thoughts, but keep in mind it’s only your opinion and it doesn’t match the reality. You can try to do something to change the reality. But at this moment it’s not the reality.</p><p>Once you start noticing the gap between your thoughts and reality, once you realize your interpretation is just <strong>one of many</strong>, your grip loosens.</p><p>And when the grip loosens, so does the suffering.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=618dd3247ad5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DeepSeek Sparse Attention and Its Implementation in SGLang]]></title>
            <link>https://shawnding.medium.com/deepseek-sparse-attention-and-its-implementation-in-sglang-b0bb907c375a?source=rss-fbb61c5a6e63------2</link>
            <guid isPermaLink="false">https://medium.com/p/b0bb907c375a</guid>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Shawn Ding]]></dc:creator>
            <pubDate>Sun, 08 Feb 2026 03:35:52 GMT</pubDate>
            <atom:updated>2026-02-08T05:50:16.269Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TSp0eHcgE8HJtv1S6ZF7XQ.png" /></figure><p>In this post we’ll talk about sparse attention mechanism in Transformer architecture. There are various designs of sparse attention, and we will use DeepSeek Sparse Attention (DSA) as an example, which is introduced in DeepSeek v3.2. We will then examine how DSA is implemented in SGLang.</p><h3>Sparse Attention v.s. Full Attention</h3><p>To introduce sparse attention, we need to start with the full attention mechanism and its drawback.</p><p><strong>Full Attention</strong>. The original self-attention mechanism in Transformer architecture is called full attention. It has a well-known bottleneck: it’s computationally expensive. Every token needs to attend to all tokens in the sequence, which means O(<em>s</em>² * <em>h</em>) computational cost (<em>s</em> is the sequence length and <em>h</em> is the model hidden dimension size). The cost increases quadratically with sequence length.</p><p>Full attention is fine for short inputs, but today’s model supports longer and longer context window, the cost quickly becomes overwhelming. If you don’t have an intuitive idea of this, let’s see an example. The first version of ChatGPT (GPT 3.1) has a context window of 128K, while the latest Gemini 3 Pro has a context window of 1M. So the computation cost will increase (1M/128K)² which is 64 times! If it requires one second to generate the first token for a prompt of 128K, it now needs more than one minute (64 seconds) for a prompt of 1M.</p><p><strong>Sparse Attention</strong>. To deal with this problem, researchers have explored a family of new self-attention designs referred to as <strong>sparse attention.</strong> The key idea is simple: most tokens don’t need to attend to <em>all</em> other tokens. Instead of computing a dense attention matrix, sparse attention limits each token to interact with only a small, carefully chosen subset of tokens. By cutting down unnecessary attention connections, these methods significantly reduce computation and memory overhead.</p><p>There are many ways to introduce sparsity, and different sparse attention designs explore various sparsity patterns, including local window attention where tokens only attend to nearby tokens, block-wise attention, strided attention, or global tokens that capture long-range dependencies. Some methods rely on predefined patterns motivated by linguistic or positional priors, while more advanced methods learn sparse patterns dynamically, allowing the model to decide which tokens are worth attending to.</p><p>See the below figure for an overview of these different sparse attention designs:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*daTKbdj3JTwawzGdS1dQNg.png" /><figcaption>Various Sparse Attention Designs (<a href="https://www.researchgate.net/publication/372756278_SSTNet_Saliency_sparse_transformers_network_with_tokenized_dilation_for_salient_object_detection">image source</a>)</figcaption></figure><p>Despite restricting full connectivity, well-designed sparse attention mechanisms are able to preserve most of the expressive power of full self-attention, achieving comparable performance while enabling much longer context lengths.</p><p>Overall, sparse attention offers a practical trade-off between efficiency and expressiveness. It makes Transformers much more scalable, especially for long-sequence tasks, and has become a key building block in modern large-scale models that push context length beyond what full attention can realistically handle.</p><h3>DeepSeek Sparse Attention(DSA)</h3><p>DeepSeek V3.2 introduced the DeepSeek Sparse Attention (DSA) design. Note DSA is different than Native Sparse Attention (NSA) that DeepSeek published in an earlier paper. NSA follows a block-wise sparsity scheme. In contrast, DSA adopts a finer-grained token-wise sparsity strategy.</p><p>Specifically, DSA introduces two major components:</p><ul><li>A lightning indexer, which computes an <strong>index score</strong> between a query token and each previous token, then uses those scores to decide which tokens are worth attending to.</li><li>A top-k selector for fine-grained token selection.</li></ul><p>See the below figure from the DeepSeek paper:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*34ahh7K9AlxcbTIApfeeUw.png" /><figcaption>The two major parts in DSA in DeepSeek v3.2 (<a href="https://arxiv.org/pdf/2512.02556">image source</a>)</figcaption></figure><p><strong>The lightning indexer</strong>. The lightning indexer computes an index score between a query token and each previous token, then uses those scores to decide which tokens are worth attending to. And below is how the index score of query token t and token s:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/780/1*C1a4kL0XEuXx_WiBKz5ZDA.png" /></figure><p>Crucially, this indexer is engineered to be much cheaper than full attention:</p><ul><li>relatively few “indexer heads”</li><li>simple activation choice (they explicitly mention ReLU for throughput)</li><li>implementable efficiently (the surrounding ecosystem emphasizes optimized CUDA kernels / FP8 friendliness)</li></ul><p>So even though scoring can still look like “compare to many previous tokens”, it’s designed to be a fast filter rather than the full attention computation.</p><p><strong>Top-K selector</strong>. Once each query has scores for previous tokens, DSA retrieves only the top-k KV entries and runs attention on that sparse set. In the DeepSeek-V3.2 report, they mention selecting <strong>2048 tokens per query</strong> during sparse training.</p><p>This changes the “core attention” cost from something quadratic-ish to something closer to <strong>O(L·k)</strong> for the main attention compute, where k is the number of selected tokens.</p><p>This shows how only the selected top-k key-value is selected for attention computation:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/758/1*wtN9ezZMGPRGgkXiFxuRXA.png" /></figure><h3>DSA Implementation in SGLang</h3><p>There are many different implementations for the attention module in SGLang, including FlashAttention, trtllm_mla, etc. Each attention implementation is abstracted as an “attention backend” in SGLang and it’s selected at runtime. Following this existing framework, DSA in SGLang is also implemented as a new attention backend named <em>NativeSparseAttnBackend</em>, which can be enabled in command-line parameters via “ <strong>— attention-backend nsa</strong>”.</p><p>The implementation of nsa backend is mainly located in <strong>$srt/layers/attention/nsa:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FQVn1Ruj-SC3poIHt6jvbA.png" /><figcaption>NSA related source files in SGLang</figcaption></figure><p>You may be a little confused because previously we stated that DSA is different than NSA. here the folder is called nsa but maintainers explicitly clarified that most of the “nsa” code path actually implements the DeepSeek-V3.2 DSA pipeline. The name stuck because development started before the V3.2 report solidified terminology.</p><p>Here are some high level descriptions of the implementation:</p><ul><li>SGLang implements nsa attention backend as a <strong>two-stage backend</strong>: a Lightning Indexer computes cheap relevance scores and performs Top-K token selection, then a sparse attention kernel (typically sparse MLA) attends only over those selected tokens. <br>Here is the supported attention backend:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*C3XkC_YuCcQ1Al2Ba436fQ.png" /><figcaption>Supported attention backend within <em>NativeSparseAttnBackend</em></figcaption></figure><ul><li>nsa_indexer.py is the centerpiece: it contains the scoring/gating logic (including Torch-compiled sections) and emits indices for the sparse kernel. It’s also the biggest perf hotspot in decode due to tiny matmuls (e.g., weights_proj) and kernel-launch overhead around Top-K.</li><li>The implementation is explicitly phase-aware: prefill focuses on handling large ragged batches efficiently; decode focuses on stream overlap and shaving micro-kernels.</li><li>Kernel plumbing includes TileLang-based kernels (e.g., act_quant) on CUDA and a fused npu_lightning_indexer custom op on NPU, showing SGLang treats the indexer as a first-class, hardware-optimized component.</li><li>Correctness is tricky because Top-K selection must map correctly onto paged KV cache layouts; SGLang added dedicated unit tests for the indexer to ensure robustness.</li></ul><p>When you run with the NSA backend enabled, the execution flows roughly like this:</p><ul><li>The model hits self.indexer(...) during the “absorb prepare” stage in deepseek_v2.py (DeepSeek V3.2 is implemented in that file in SGLang).</li><li>The attention kernel execution later goes through radix_attention.py -&gt; base_attn_backend.py -&gt; nsa_backend.py, and then into TileLang sparse kernels.</li></ul><p>So overall, SGLang splits sparse attention into two big responsibilities:</p><ul><li>Indexer (routing): decide <em>which</em> keys each query attends to.</li><li>Kernel/backend (compute): given Q, K, V and sparse indices, compute attention efficiently (paged KV cache friendly, GPU kernel optimized).</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b0bb907c375a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Similarities Between Investing and Driving]]></title>
            <link>https://shawnding.medium.com/similarities-between-investing-and-driving-6c94b60cbfee?source=rss-fbb61c5a6e63------2</link>
            <guid isPermaLink="false">https://medium.com/p/6c94b60cbfee</guid>
            <category><![CDATA[investment]]></category>
            <dc:creator><![CDATA[Shawn Ding]]></dc:creator>
            <pubDate>Mon, 24 Feb 2025 04:46:10 GMT</pubDate>
            <atom:updated>2025-02-24T04:46:10.091Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*g0dKQo3Q-b1sRtnXPJJInQ.jpeg" /><figcaption>Image source: <a href="https://www.makingyourmoneymatter.com/the-car-analogy-for-investing-your-financial-road-trip/">makingyourmoneymatter.com</a></figcaption></figure><p>Today, I happened to be thinking about the similarities between two activities: investing and driving. At first glance, they might seem like completely different activities, but they actually share a lot in common. Both require discipline, risk management, and a deep understanding of the rules to avoid costly mistakes. And long-term success is probably the most important goal for both. I think summarizing these similarities will help deepen my understanding of investing, which is why I wrote this blog. Let me know if you find more similarities!</p><p>Here’s why I think investing is very similar to driving:</p><h3>1. Rules Exist to Protect You</h3><p>When you’re driving, certain rules are in place for a reason — you shouldn’t run a red light, you need to stop at a stop sign, and you must carefully watch traffic before making a right turn. Many people view these rules as restrictions, and that’s true. But they are also safeguards. Just think about how dangerous it would be if you didn’t follow them.</p><p>Similarly, in investing, fundamental principles like risk management, stop-loss strategies, portfolio diversification, and personal investment rules exist to protect your investments. You wouldn’t ignore a stop sign just because you haven’t been in an accident yet. Similarly, you shouldn’t neglect your investment rules just because you haven’t experienced a major loss. Ignoring rules — or worse, not having any — might work for a while, but eventually, the consequences catch up.</p><h3>2. Maintain a Safe Distance — Your Margin of Safety</h3><p>One of the first things we learn in driving is to keep a safe distance from the vehicle ahead. This space gives us reaction time in case something unexpected happens, like the car in front suddenly braking. In investing, this principle translates to the concept of a margin of safety — we should buy assets at a price lower than their intrinsic value to cushion against market fluctuations.</p><p>Investors who operate without a margin of safety, much like reckless drivers who tailgate, put themselves at greater risk of sudden losses. When a market downturn or an unexpected event occurs, those who failed to build in a safety buffer will likely find themselves in trouble.</p><h3>3. Make Good Habits Your Second Nature</h3><p>A skilled driver doesn’t need to consciously think about every single action — they just do it. Checking mirrors, signaling before making a turn, and braking at the right moment all become second nature through repetition. Investing should be approached the same way.</p><p>Similarly, good investment habits should become instincts rather than afterthoughts. Practices like risk management, portfolio balancing, and disciplined decision-making should be ingrained. You wouldn’t flip through a driving manual in the middle of an intersection, so why wait until a financial crisis to learn about risk management? The best investors internalize good habits long before they need them.</p><h3>4. Reckless Behavior Will Catch Up With You</h3><p>Some drivers speed through traffic, run red lights, and take unnecessary risks. Maybe they get away with it once, twice, or even a dozen times. But eventually, luck runs out, and they end up in an accident. The same is true for investing.</p><p>If you constantly chase high-risk strategies — over-leveraging, trying to time the market, or gambling on speculative assets — you might enjoy short-term gains, but eventually, the odds will turn against you. It only takes one major mistake to wipe out years of progress. Investing is about building lasting wealth, not making reckless bets that could end in disaster.</p><h3>5. The Best Drivers — and Investors — Don’t Make Headlines</h3><p>In Chinese, there is a proverb: <strong>“Great generals who are good at war don’t have a legendary reputation.”</strong> It means that legendary generals often win battles that are incredibly difficult and risky. But a truly great general plans carefully, chooses the right time and place, and ensures the victory seems natural — or even boring. They don’t take unnecessary risks, so they don’t gain a legendary reputation.</p><p>An excellent driver should also be unnoticed. They just follow the rules, avoid accidents, and reach their destination safely every time. They don’t make the news because they don’t crash. On the other hand, reckless drivers may have a “legendary” reputation for near-misses or dramatic situations — but eventually, their luck runs out.</p><p>Investing works the same way. The best investors have steady, even “boring,” return curves without dramatic highs and drawdowns. Meanwhile, we often hear exciting stories about people who make huge, rapid gains when no one expects them to. But for every success story, there are countless untold failures. The reason something is legendary is because it’s rare.</p><h3>6. Build Systems and Good Habits From Beginning</h3><p>Both driving and investing are lifelong activities. If you develop poor driving habits, they become difficult to break. The same is true for investing — bad financial habits, such as impulsive trading, excessive risk-taking, or lack of research, can be destructive over time.</p><p>Sometimes we believe we can adopt reckless investment habits early on and “fix them later” after making money. But just like a driver who repeatedly speeds and ignores traffic rules, an investor who consistently takes unnecessary risks might not get the chance to correct course before disaster strikes. The key is to develop good habits from the start and stick with them.</p><h3>7. The Goal Is to Arrive Safely — Not to Compete Who is the Fastest</h3><p>Ultimately, driving isn’t about being the fastest on the road; it’s about reaching your destination safely. Investing follows the same principle — the goal isn’t to achieve the highest short-term returns, but to maintain steady, long-term growth.</p><p>Some investors get caught up in comparing short-term returns or trying to grow their investments as quickly as possible. But in the end, what matters is long-term success. Investing is a marathon, not a sprint. The real victory is arriving safely at your financial goals.</p><h3>8. Get Familiar With Your Car and Roads</h3><p>When driving on roads you know well and in a car you’re comfortable with, you drive more efficiently and safely. In investing, this translates to focusing on your <strong>circle of competence</strong> — investing in industries, companies, and asset classes you truly understand.</p><p>Chasing every hot trend or investing in unfamiliar markets is like driving a new car on an unfamiliar road in the dark — you might be able to navigate, but the risks increase significantly. Seasoned investors stick to what they know best, refining their expertise instead of spreading themselves too thin.</p><h3>Final Thoughts</h3><p>The best drivers aren’t the ones who take the most risks — they’re the ones who consistently arrive at their destination without incident. Similarly, the best investors aren’t those who make the most exciting moves but those who steadily increase their wealth over time.</p><p>By following the rules, maintaining a margin of safety, building good habits, and focusing on steady progress, I hope we can navigate the investment world as safely and effectively as a skilled driver handles the road. Investing isn’t about speed — it’s about staying on course and reaching our financial goals safely and successfully.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6c94b60cbfee" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Scheduling Algorithms in Cloud Data Centers]]></title>
            <link>https://shawnding.medium.com/scheduling-algorithms-in-cloud-data-centers-949f517eb94e?source=rss-fbb61c5a6e63------2</link>
            <guid isPermaLink="false">https://medium.com/p/949f517eb94e</guid>
            <category><![CDATA[clustering]]></category>
            <category><![CDATA[scheduling]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[data-center]]></category>
            <dc:creator><![CDATA[Shawn Ding]]></dc:creator>
            <pubDate>Mon, 25 Dec 2023 21:12:40 GMT</pubDate>
            <atom:updated>2023-12-25T21:12:40.668Z</atom:updated>
            <content:encoded><![CDATA[<h3>Cluster Schedulers in Cloud Data Centers (Part I)</h3><h4>An overview of four different styles of job scheduling algorithms</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qdAwwHEZualoEii48x-4GQ.jpeg" /><figcaption>Source: <a href="https://t5datacenters.com/custom-solutions/">t5datacenters</a></figcaption></figure><p>Cluster Scheduler is one of the core components in cloud infrastructure and it determines the resource utilization of data centers. If you are a hyper-scaler like AWS or Azure, you’ll have millions of servers globally across multiple regions and data centers. Even one single percent improvement of resource utilization will yield a significant financial return for you.</p><p>Over the last a few years I’ve been working on various scheduling projects, from VM scheduling to container scheduling. In order to build a production-grade scheduler for a large-scale data center, there are many factors need to be taken into consideration, like central scheduler vs distributed scheduler, scheduling policy optimizations.</p><p>Among all these considerations, what intrigues me the most is the diverse array of scheduling algorithm styles. It’s fascinating that there are several totally different styles of cluster schedulers. This shows how creative people are with vast different ways to solve a same problem.</p><p>In this article, I will give an overview of four different styles of scheduling algorithms:</p><ul><li>Rule-based schedulers</li><li>Flow-based schedulers</li><li>SQL based schedulers</li><li>ML based schedulers</li></ul><p>I will first briefly introduce the background of cluster scheduling in case you are not familiar with this field. Then I will go through the different styles of schedulers. This article will cover the first two styles, and a second article will cover the last two.</p><h3>Background: What Does A Scheduler Do</h3><p>The job of a cluster scheduler is to find the “best” host among a cluster to run a workload. A workload can be a container or a VM. A host is usually a physical machine to run VM workloads, and for container workloads a host can be a physical machine or a VM. But from the scheduler’s perspective it really doesn’t matter. Scheduler only cares which host it should assign a workload to. The key point is about the workload-host mapping, not about whether the host is a physcial machine.</p><p>A typical scheduling process works like this:</p><ul><li>A cluster management system (CMS) is running in your data center to manage cluster hosts. Usually the CMS has a few master servers, and it has an agent running on each host. The agent keeps reporting host status to the master servers, such as the heartbeat of the host.</li><li>Scheduler is a component of the master servers.</li><li>Each host is described with a list of properties, such as (cpu architecture: x86; available cpu cores: 128; available memory: 512G; available GPUs: 8; location: AZ1; …)</li><li>A customer submits a request to create a VM, either through cloud portal UI or an API call. It requests to create a VM with the following properties: (requested cores: 8; requested memory: 32G; request GPUs: 2)</li><li>Scheduler needs to determine which host is the best one to run this workload. In other words, it needs to generate an output pair (W, H), where W is the submitted workload request and H is the selected host.</li><li>When making the decisions, scheduler typically needs to consider lots of constraints, such as: if the host has enough resource for the VM (CPU, memory, GPU, disk, RDMA, ….); if this host meets affinity and anti-affinity constraints; if this host meets resource allocation policies (stacking or distributing), etc.</li></ul><p>From algorithm perspective, scheduling is really about finding an optimization under two types of constraints:</p><ul><li><strong>Hard constraints</strong>: the conditions that the result host must meet. You cannot place a workload on a host if any of these hard constraints are violated. For example, your host must have at least 4 available GPUs if your workload requests 4 GPUs. This is pretty obvious.</li><li><strong>Soft constraints</strong>: some optimization goals that are nice to have but not necessary. For example, we prefer to place a VM with 1:4 (CPU:Mem) ratio on to a same 1:4 host to reduce resource fragmentation on this host, but it’s acceptable to place on other hosts if we run out of all 1:4 hosts.</li></ul><p>That’s it. It’s the essence of cluster scheduler in cloud data centers. For the sake of simplicity I omitted many other factors, like online scheduling vs offline scheduling, distributed scheduling, gang scheduling, re-scheduling. But the model above is sufficient to under the following discussions.</p><h3>Style 1: Rule-based Scheduling</h3><p>The first scheduling style we’re going to talk about is rule-based style, also called as “filter/score” style because it usually consists of filter rules and scorer rules.</p><p>This style is the most conventional one and it’s also the mainstream style of resource schedulers in today’s cloud data centers. It’s adopted by many industry schedulers including OpenStack, Kubernetes, Azure Protean and so on.</p><p>Filter rules and scorer rules are defined as following:</p><ul><li>Filter rules: they represent hard constraints. It’s a function which returns “true” or “false” for a given pair of a workload and a host.</li><li>Scorer rules: they represent soft constraints. each rule returns a “score” about how desired the placement is if this workload is placed on this host.</li></ul><p>When a new workload <em>W </em>is submitted:</p><ul><li>Scheduler runs all filters for all hosts. Let’s say the scheduler has 20 filter rules and 10K hosts, then it calls each of the 20 filter functions 10K times, each time with a same workload object <em>W</em> but a different host object <em>H</em>.</li><li>Let’s say, the 10K candidate hosts are reduced to only 500 after the filtering stage.</li><li>For the remaining 500 hosts, scheduler runs all scorer functions on each host, and then generate a ranking based on the returned score from each scorer function.</li><li>Pick the top candidate host in the 500 hosts ranked by combined scores.</li></ul><p>See the diagram below for a simple example. Originally there are 4 candidate hosts. After running all three filters (represented by the funnels), there are only 2 hosts remained (or “survived”). Next, the two remaining hosts are evaluated against 2 scorer rules (func 1 and func 2). The host 2 gets a sum of 54, and host 4 gets 39. So host 2 is eventually chosen to run the workload.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/729/1*kduSyz8gcvyMLaIVXNXj5w.png" /><figcaption>Source: <a href="https://www.ovirt.org/develop/release-management/features/sla/ovirtschedulerapi.html">ovirt</a></figcaption></figure><p>Filter/Scorer model is widely used in today’s cluster scheduler. You can check source code in Kubernetes or OpenStack to get a more direct understanding. The terms could be different, like in Kubernetes it’s called filter and priorities, while in openStack they are called filters and weights.</p><p>Various optimizations could be employed to improve the performance of filter/scorer based schedulers. Some obvious optimizations include running filter functions or scorer functions concurrently on candidate hosts, and there are also some less obvious ones:</p><p><strong>Quality-controlled Sampling: </strong>if you are scheduling workloads on a very large cluster (let’s say, more than 10K hosts), you don’t necessarily need to run filters and scores for every candidate host. The idea is, you only need to find a “good enough” host, so you actually can evaluate a subset of hosts if you can find a satisfying one among them (“Sampling”).</p><p>The problem is how to define “good enough”. One simple way is, set a number threshold on the survived hosts after the filtering stage. Let’s say, this number is set to 500. If you have 500 hosts survived after the filter stage, technically all these 500 hosts can run your workload without problems. It’s very likely you can find a good enough one from these 500 candidates. So in the filter state, you can stop running filters on remaining hosts once the number of filtered hosts reach 500.</p><p>Kubernetes scheduler applied this idea and uses parameter “percentageOfNodesToScore” to control this process (<a href="https://kubernetes.io/docs/concepts/scheduling-eviction/scheduler-perf-tuning/">https://kubernetes.io/docs/concepts/scheduling-eviction/scheduler-perf-tuning/</a>)</p><p><strong>Compute cache</strong>: compute cache is another very interesting optimization idea. It was used by Microsoft Azure’s Protean scheduler (<a href="https://www.microsoft.com/en-us/research/publication/protean-vm-allocation-service-at-scale/">https://www.microsoft.com/en-us/research/publication/protean-vm-allocation-service-at-scale/</a>). The basic idea is to cache the result of filter/scorer functions for next round of scheduling.</p><p>Usually we rerun all filter/score functions for each incoming workload request. But if you really think about it, most host status will remain unchanged between the last scheduling round and this round. Therefore you can cache the filer/score result of the host.</p><p>This technique requires complicated data structures to track the cached rule result, but it works very well. In our practice this technique can almost reduce the scheduling time complexities from O(N) to O(1), which is especially useful for large clusters.</p><h3>Style 2: Flow-based Scheduling</h3><p>Instead of a list of hand-crafted filter/scorer rules, scheduling logics can also be described in a totally different style: a flow network.</p><p>An early research of flow-based scheduler is Quincy (<a href="https://dl.acm.org/doi/abs/10.1145/1629575.1629601">https://dl.acm.org/doi/abs/10.1145/1629575.1629601</a>), which is from Microsoft research. It’s mostly about the cluster scheduling in Microsoft Bing and how to optimize data locality during scheduling.</p><p>Quincy’s scenario is slightly different than the general workload scheduling scenario we described in the background section. In our concept model, a workload is simply a VM or a container, and we assign the workload to one of the cluster servers to run. In this model a workload is basically a blackbox to us — we don’t know what applications are running inside the VM or the container.</p><p>Quincy is targeted at clusters running big data and machine learning jobs. For such clusters, users don’t submit a VM or a container (in fact containers didn’t exist when the paper was published.) Instead, they submit a root task and then the root task spawns multiple worker tasks to do the job. It’s a pretty standard model in data processing world. Root task is able to gather data location information related to each worker tasks, for example in a HDFS system which machine/rack has the majority of the input data for a worker task. The root task will then submit such machines or racks as a list of “preferred machines/racks” to Quincy scheduler, and Quincy will try to schedule tasks to these preferred machines/racks to reduce the data transfer among machines.</p><p>Quincy models a scheduling problem as a constraint-based optimization over a graph data structure. One example from the paper is illustrated by the graph below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/754/1*pnK8Dn8sp-n0Yxfaynp2mQ.png" /><figcaption>Source: Quincy: <a href="https://www.sigops.org/s/conferences/sosp/2009/papers/isard-sosp09.pdf">Fair Scheduling for Distributed Computing Clusters</a></figcaption></figure><p>As you can see from the graph, there are edges and different types of nodes:</p><ul><li>Two root tasks (r1 and r2), they spawned a few worker tasks (like W16 means it’s the 6th task created by the root task R1)</li><li>Machine (Computer) nodes like C1-C6.</li><li>Rack nodes R1 and R2. A rack nodes is connected to all machines under the rack.</li><li>Sink node S. All flows must end at the sink node.</li><li>If a task node is connected to a computer node, it means this task is scheduled to that computer node.</li></ul><p>well, how do we come up with a scheduling decision based on a flow network? Here’s the idea:</p><ul><li>Think of task nodes as some goods, and you need to transport these goods to the sink node.</li><li>In order for a goods to be transported to the sink node, it needs to go though some intermediate nodes and some edges.</li><li>When a goods go through an edge, there is a cost, and each edge has a capacity limit.</li><li>Find a transport solution which minimizes the cost to transport all goods to the sink.</li></ul><p>This is called Minimized Cost and maximize the flow (MCMF). And you can use a standard solver to find the scheduling result.</p><p>With this approach, you can introduce various intermediate nodes to represent various scheduling policies or constraints, such as network topology, resource constraints, pending job queues, etc. And you also set the cost and capacity based on your specific scheduling needs.</p><p>This flow-network based scheduling approach has a few advantages. It naturally has a global view of the workloads and cluster machines. So it’s good at batch scheduling, group optimization and has high throughput.</p><p>But the scheduling algorithm in Quincy paper isn’t very high performant. Firmament (<a href="https://dl.acm.org/doi/10.5555/3026877.3026886">https://dl.acm.org/doi/10.5555/3026877.3026886</a>) is a work after Quincy. It improved the algorithms to reduce scheduling latency. It’s claimed to reach sub-second scheduling latendy on a cluster of 12K machines. Firmament also has an open-source C++ implementation of around 24K lines of code.</p><p>The diagram below from the Firmament paper shows several cases where we can use flow network to describe different scheduling policies:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TWodmoEORpg_pY5Ez7wI4A.png" /><figcaption>Source: Firmament Paper</figcaption></figure><p>As you can see from the diagram description, it’s very flexible to introduce various intermediate nodes to represent different scheduling requirements or policies.</p><p>Poseidon (<a href="https://kubernetes.io/blog/2019/02/06/poseidon-firmament-scheduler-flow-network-graph-based-scheduler/">https://kubernetes.io/blog/2019/02/06/poseidon-firmament-scheduler-flow-network-graph-based-scheduler/</a>) is an alternative scheduler in K8S community based on Firmament. Instead of rewriting Firmament in Go and talking to Kubernetes API Server just like any other Kubernetes controllers, It uses an adaptor to bridge the information between K8S API Server and Firmament scheduler, as shown in the diagram below:</p><figure><img alt="How Poseidon integrates Firmament scheduler with Kubernetes" src="https://cdn-images-1.medium.com/max/1024/1*RRAS6WZan_ZQg9YkO5dJrg.png" /><figcaption>Source: <a href="https://kubernetes.io/blog/2019/02/06/poseidon-firmament-scheduler-flow-network-graph-based-scheduler/">Kubernetes.io Blog</a></figcaption></figure><p>Several years ago I worked with my colleagues on this project, and then they upstreamed it to Kubernetes community. The performance test result was pretty good, but the project didn’t become very popular and eventually got retired in the K8S community. In retrospect, I think there were at least two reasons why it didn’t get wide adoption:</p><ul><li>Poseidon has difficulty supporting all features of native K8S scheduler, not to mention keeping up with the fast evolving of K8S scheduling. I remember lots of time was spent on supporting affinity and anti-affinity.</li><li>The native Firmament scheduler is written by C++. Poseidon only wrapped it with an adaptor but didn’t rewrite it with Go. The project has difficulty attracting enough contributors in K8S community, which is dominant by Go.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=949f517eb94e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AWS Re:Invent 2023: An Infrastructure Perspective]]></title>
            <link>https://towardsaws.com/aws-re-invent-2023-an-infrastructure-perspective-533e64bb992a?source=rss-fbb61c5a6e63------2</link>
            <guid isPermaLink="false">https://medium.com/p/533e64bb992a</guid>
            <category><![CDATA[reinvent]]></category>
            <category><![CDATA[iaas]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <dc:creator><![CDATA[Shawn Ding]]></dc:creator>
            <pubDate>Sun, 10 Dec 2023 06:13:42 GMT</pubDate>
            <atom:updated>2025-02-20T23:57:40.775Z</atom:updated>
            <content:encoded><![CDATA[<h4>Highlights and Thoughts in the areas of Compute(Silicon), Network and Storage</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tMRHVtM_4TtttD4fLe3AjA.jpeg" /><figcaption>Source: <a href="https://tech.vegas/event/aws-reinvent-2023/">Tech.Vegas</a></figcaption></figure><p>Last week I was traveling in Las Vegas, but not for gambling or watching shows. I was there for the annual AWS Re:Invent Conference. It’s really informative to watch the latest AWS product announcements, chat with interesting startups in the Expo Hall, and talk to participants and leaders from various fields.</p><p>Since the first Re:Invent conference in 2012 in Las Vegas, this year has been the 11th year of the annual event. Re:Invent has been the most famous conference in the cloud computing industry. According to AWS, there were more than 50,000 participants this year. And it’s not surprising that Generative AI is the theme this year. AWS CEO Adam Selipsky used almost half of his keynote time to talk about Generative AI and its integration with data and analytics.</p><p>Because I’m working in Cloud/AI Infrastructure area, my attention was mostly drawn to cloud infrastructure (compute, network, storage) and also generative AI. In this article, I’d like to discuss highlights from these areas and also share some of my thoughts. Regarding the Generative AI part, I probably will write another article to cover it.</p><p>This article will not discuss updates from other areas such as analytics, database, container, serverless, developer tools, etc. For a comprehensive list of announcements, refer to this categorized index page composed by Amazon:</p><ul><li><a href="https://aws.amazon.com/blogs/aws/top-announcements-of-aws-reinvent-2023/">https://aws.amazon.com/blogs/aws/top-announcements-of-aws-reinvent-2023/</a></li></ul><p>And check this Youtube channel for the live recordings of the event sessions:</p><ul><li><a href="https://www.youtube.com/@AWSEventsChannel">https://www.youtube.com/@AWSEventsChannel</a></li></ul><h3>Compute (Silicon)</h3><p>The biggest announcements here are about two AWS homegrown chips: Graviton 4 (ARM server CPU) and Trainium 2 (AI training chip).</p><p>In addition to Graviton and Trainium, AWS has two other important custom-design chips. But there were no updates for these two chips this year, mostly because both of them had an update last year:</p><ul><li>Inferentia: AWS AI chip designed for AI inference. Last year it was just updated to V2.</li><li>Nitro: AWS DPU which powers almost all new EC2 instances. Last year Nitro was updated to V5.</li></ul><h4>Graviton 4</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WuEdPdwlnTk-4wNeao997Q.png" /><figcaption>Source: <a href="https://www.youtube.com/watch?v=T_hMIjKtSr4">Slides of Re:Invent Session CMP334</a></figcaption></figure><p>Let’s start with Graviton. I picked several important slides from the conference and put the screenshots above. The top left one shows how the Graviton chip looks like from the first generation to the latest (fourth) generation, and the remaining slides show some important technical features of the latest generation. I recommend you watch <a href="https://www.youtube.com/watch?v=T_hMIjKtSr4">this deep dive session</a> if you are interested in the details.</p><p>Some of the technical highlights of the latest generation:</p><ul><li>Arm Neoverse v2 cores, 96 cores (50% increase from 64 in V3) per socket.</li><li>12 DDR memory controllers (50% increase from 8 in V3). L2 cache 192M (3 times compared to V3).</li><li>Per core performance 30%-45% increase for database applications and Java applications.</li></ul><p>One interesting thing is that Graviton 4 starts to support mutli-die coherency and therefore, a dual-socket server design. it’s interesting because this is different than the unique 3-socket design for Graviton 3, which has no inter-CPU connections. Graviton-3 servers have three processors but all these three processors are independent from each other, like three separate systems sharing the same motherboard. Given Graviton 4 is based on Neoverse v2 cores, it’s likely the interconnect is based on ARM’s <a href="https://fuse.wikichip.org/news/5006/the-mesh-network-for-next-generation-neoverse-chips/">CMN-700 mesh network </a>which supports CCIX and CXL. But It’s not confirmed.</p><p>Graviton 4 will be first used in EC2 R8g instances, available in 2024. Thanks to the new dual-socket design, R8g instances can be up to 192 vCPU. R7g only supports 64 vCPU, which is the limit of a single socket and the cores of a single Graviton 3 processor.</p><p>Another interesting thing is about the ECU performance of Graviton 4. Graviton 4 has an estimated ECU performance score of 525.3, which is much better than Graviton 3 (404), but not as good as Graviton 3E (545.5). It’s because Graviton 3E is overclocked to 3.5G HZ while Graviton 4 is probably around 2.7G HZ.</p><p>AWS also announced it has 150 different Graviton-powered EC2 instance types and has produced more than 2 million Graviton processors. Considering typical Graviton servers have 2 or 3 sockets, it translates to 700K to 1 million servers over the past 3 generations of Graviton. This number is huge.</p><h4>Trainium 2</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zOmP8uhNVdw378tRBYlnhw.png" /><figcaption>Trainium 1 and Trainium 2, Source: <a href="https://www.youtube.com/watch?v=YRqvfNwqUIA">Re:Invent Slides</a> and <a href="https://www.anandtech.com/show/21173/amazons-trainium2-features-96-gb-hbm-quadruples-training-performance">anandtech</a></figcaption></figure><p>Another big announcement is Trainium 2, the AWS custom-design AI chip for AI training workloads. Trainium 2 took AWS 3 years (2020–2023) to build, and Inferentia took 4 years (2018–2022).</p><p>Not many technical details have been disclosed for Trainium 2. The corresponding EC2 instance is also not available until 2024. So far what we know are only some high-level descriptions and some performance numbers:</p><ul><li>Trainium 2 is a multi-tile system-in-package featuring two compute tiles, four HBM memory stacks, and two other chiplets .</li><li>Compared to Trainium 1, Trainium 2 has 4x higher training performance, 2x higher performance per watt, and 3x as much memory (96G HBM).</li><li>Available in <strong>Trn2 instances</strong>. The instance offers 16 Trainium 2 chips. Trn2 instances are connected with EFA NICs and can be extended to 100,000 Trainium 2 chips.</li></ul><p>AWS published an architecture block diagram for Trainium 1 (see below). I haven’t found a similar diagram for Trainium 2.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Qs5oR3mdyVqsIpLhnFTbMw.png" /><figcaption>Source: <a href="https://awsdocs-neuron.readthedocs-hosted.com/en/latest/general/arch/neuron-hardware/trainium.html)">AWS TRN1 document</a></figcaption></figure><h4>Diversified AI Chips</h4><p>AI chips market has been dominated by Nvidia GPU for a long time. But over the past several years, we’ve seen a clear trend of diversified AI chips:</p><ul><li>Traditional hardware vendors are quickly catching up. For example, Azure has adopted AMD MI200 last year. And AMD MI300 series delivers pretty promising performance. AWS adopted Intel Habana several years ago. And just weeks before the Re:Invent conference, AWS announced its DL2q instance family which is equipped with Qualcomm Cloud AI 100 inference chips.</li><li>More and more custom AI chips from cloud hyper-scalers, such as Microsoft’s Maia 100, Meta’s MTIA. Not to mention Google TPU or AWS Trainium/Inferentia which have been there for a few years.</li><li>New architecture hardware, mainly CPU-GPU hybrid architecture. This includes Nvidia Grace-Hopper and AMD MI300A.</li><li>AI Chips from startups, like Tenstorrent, Graphcore, Cerebras, etc.</li><li>Software stack support for the diversified AI hardware backends. PyTorch 2.0 introduces compile mode, and the default target of its compiler Inductor is Open AI Triton. This eliminates the dependency of CUDA. This September Triton had its first developer conference. At the conference, we can see the integration from various hardware vendors: Nvidia, AMD, Intel, Meta, Google, etc.</li></ul><p>In short, diversified AI chips will give customers more choices and also bring more optimization/integration opportunities in the AI software stack.</p><p>AWS is the leading cloud vendor in terms of providing diversified AI chips. The picture below shows a portfolio of various EC2 instances for ML/AI applications that are currently available in AWS:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XalQjU0SVHr_-wprNt07-A.png" /><figcaption>Source: <a href="https://www.youtube.com/watch?v=dxm93_qgRzk">AWS Re:Invent session CMP219</a></figcaption></figure><h3>Network</h3><p>Honestly, I didn’t see many big announcements in the network area this year. Compared to the announcements of last year such as Verified Access, VPC Lattice or ENA Express, this year’s announcements seem less significant.</p><p>Some of the interesting new features are listed below. And there are also some announcements about IPV6 support in various products.</p><h4>EC2 Instance Topology API</h4><p>A new API called <em>DescribeInstanceTopology</em>. It’s designed for HPC/ML workloads which require low latency and high throughput. You can use the new API to find the network location of your instances, and then use this information to optimize job placements so that they are physically closer to each other.</p><p>According to the AWS document, every EC2 instance connects to a node-set. A node-set comprises three network nodes, with each node representing a different layer in the AWS network. The network layers are arranged in a hierarchy of 3 or more layers. I guess each node here is a data center switch (S0, S1, and S2).</p><p>The screenshot below shows an example response for the API call. As you can see, the instances i-1111111111example and i-2222222222example are located closest to each other compared to the other instances as they share the same network node set. Applications (such as ML framework) can leverage this information to optimize their job placements.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HHnPUMYPsQZwQu2nuu-kJw.png" /><figcaption>Source: <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/how-ec2-instance-topology-works.html">AWS Document of <em>DescribeInstanceTopology API</em></a></figcaption></figure><h4>Tunnel-less Cloud-WAN</h4><p>Cloud-WAN is a SD-WAN service that AWS made generally available last year. Just like other SD-WAN services, Cloud-WAN uses the Internet or Direct Connect as a transport network to interconnect customers’ data centers, branch offices and AWS cloud. Currently, these SD-WAN appliances integrate with Cloud WAN using IPsec VPN or GRE tunnels.</p><p>This feature is mainly about integrating SD-WAN infrastructure into AWS cloud using BGP instead of IPsec or GRE tunnels. Because there is no extra packet encapsulation or protocol processing, it achieves lower overhead and higher throughput. It’s pretty similar to the difference between underlay and overlay.</p><p>The screenshot below shows how to configure a tunnel-less connect peer on AWS:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FRkO5n-_3R4xgIt48MSpOg.png" /><figcaption>Source: <a href="https://aws.amazon.com/blogs/networking-and-content-delivery/build-global-sd-wans-with-aws-cloud-wan-tunnel-less-connect/">AWS Blog of Tunnel-less Cloud WAN</a></figcaption></figure><h4>More ENA Express Adoption</h4><p>ENA Express is available supported by more EC2 instances. Now 58 more instances support ENA Express.</p><p>ENA Express was announced last year. It’s basically applying <a href="https://aws.amazon.com/blogs/hpc/in-the-search-for-performance-theres-more-than-one-way-to-build-a-network/">Scalable Reliable Datagram (SRD)</a> into VPC network. Previously SRD was only used for AWS EFA interface, which is for HPC/ML applications and not general VPC applications.</p><p>Simply put, SRD is AWS’s homegrown network transport protocol for low-latency high-throughput applications. It employs some key technologies such as multi-path and out-of-order delivery to achieve these goals. SRD enables AWS to have a unified and scalable network for both HPC/AI clusters and VPC clusters, instead of having separate Infiniband/RoCE network.</p><p>The screenshot blow shows how you can enable ENA Express on a EC2 ENA NIC. But again, this isn’t something new. Just more instances support this feature now.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/599/1*9L0t-2Smg1PcQqzWt3cmpg.png" /><figcaption>Source: <a href="https://aws.amazon.com/blogs/aws/new-ena-express-improved-network-latency-and-per-flow-performance-on-ec2/">AWS Blog of ENA Express</a></figcaption></figure><h3>Storage</h3><h4>S3 Express One Zone</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L9MZ4PJ7oX6fnmrBYANFBA.png" /><figcaption>Source: <a href="https://aws.amazon.com/s3/storage-classes/express-one-zone/">AWS S3 Express One Zone</a></figcaption></figure><p>I’m not a storage guy so I didn’t spend too much time digging into the updates in the storage area. The biggest announcement is probably S3 Express One Zone, a new storage tier in S3.</p><p>S3 is one of the most popular cloud object storage services. According to AWS, today S3 holds more than 350 trillion objects and has more than 100 million requests per second on average. The main benefit of S3 Express One Zone is low latency. According to what AWS announced, S3 Express One Zone improves data access speeds by 10x and reduces request costs by 50% compared to S3 Standard. It delivers consistent single-digit millisecond data access. This is a big improvement compared to S3 standard, which has a latency ranging from tens of milliseconds to hundreds of milliseconds.</p><p>This consistent low-latency makes it a good choice for most frequently accessed data and latency-sensitive applications, such as machine learning applications and analytics workloads.</p><p>Based on my experience, customers often save their raw data in object storage but build a high-performance cache layer for latency-senstive applications. For example, in machine learning scenarios customers often access data via a mounted parallel file system. AWS’s FSx for Luster also can be linked to S3 bucket. S3 Express One Zone probably will reduce the customer needs for such a layer.</p><p>The last thing is about the naming. S3 Express One Zone is a long name. It’s probably because in the current implementation, each Amazon S3 Express One Zone directory bucket exists in a single Availability Zone, unlike traditional S3 where a bucket will be stored across zones. I guess that’s why it’s called S3 Express <strong>One Zone.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=533e64bb992a" width="1" height="1" alt=""><hr><p><a href="https://towardsaws.com/aws-re-invent-2023-an-infrastructure-perspective-533e64bb992a">AWS Re:Invent 2023: An Infrastructure Perspective</a> was originally published in <a href="https://towardsaws.com/">Towards AWS</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>