<?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 Sushmi Shrestha on Medium]]></title>
        <description><![CDATA[Stories by Sushmi Shrestha on Medium]]></description>
        <link>https://medium.com/@sushmi.sus?source=rss-a964d2d6f98------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*YRdumdWxfp_yxE90</url>
            <title>Stories by Sushmi Shrestha on Medium</title>
            <link>https://medium.com/@sushmi.sus?source=rss-a964d2d6f98------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 06:03:56 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sushmi.sus/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[Adaptive Load Shedding]]></title>
            <link>https://medium.com/agoda-engineering/adaptive-load-shedding-8c4c3b0eacf4?source=rss-a964d2d6f98------2</link>
            <guid isPermaLink="false">https://medium.com/p/8c4c3b0eacf4</guid>
            <category><![CDATA[engineering]]></category>
            <category><![CDATA[adaptive-design]]></category>
            <category><![CDATA[load-shedding]]></category>
            <category><![CDATA[graceful-degradation]]></category>
            <category><![CDATA[reactive-programming]]></category>
            <dc:creator><![CDATA[Sushmi Shrestha]]></dc:creator>
            <pubDate>Mon, 25 Apr 2022 08:16:53 GMT</pubDate>
            <atom:updated>2022-05-02T19:47:33.721Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HnoAVADA8QQ1qNdsSjGiJg.jpeg" /></figure><p><em>This blog aims to understand why services need to be adaptive and talks about the different types of adaptive services.</em></p><blockquote><strong><em>TL;DR (Too long didn’t read). </em></strong><em>Any production service must be protected from overload, especially if you cannot control your clients. We avoid overload at Agoda by structuring our systems to scale proactively before they experience overload. Protecting systems, on the other hand, necessitates multiple layers of defense. This includes automatic scaling as well as techniques for gracefully shedding excess load.</em></blockquote><p><em>In this post, we will show you our approach for adaptive traffic shedding, which allows us to re-evaluate thresholds in runtime to protect high-load services in Agoda.</em></p><h4><strong>What is adaptive load shedding?</strong></h4><p>Adaptive load shedding is a way to protect and handle requests to a service in a preemptive and smart way.</p><p>Let us start with the most common customer-facing software development scenario: “<em>build it and ship it</em>.” While this technique works for a while, our service’s performance starts degrading when additional features are added. This model results in production incidents.</p><p>Adding more servers is a simple solution to this issue. However, we need to ensure uptime as well. As a result, we built reactive features like timeouts, circuit breakers, thread pools, rate limiters, and more to make our services more stable and reliable. <br> <br>To do so, we utilized load testing technologies like <a href="https://gatling.io/">Gatling </a>or other in-house capacity measurement tools to calculate the capacity and latency of our services and keep track of their service performance. <br> <br>Our main goal is to determine the maximum number of requests the service can handle while adhering to the service level agreement and the service’s behavior under an overload. <br>This allows us to estimate how long it will be able to sustain the overloaded state and when it will crash.</p><p>We can now start creating various rules and thresholds based on these figures, such as blocking clients’ retries above a certain number. Once we implement these static numbers, we will have a maintenance overhead. From this, we will be able to adjust these numbers repeatedly. <br> <br><strong>So why are static capacity numbers brittle and need frequent adjustments?</strong></p><p>At Agoda, the main reasons that we have noticed are:</p><ol><li><strong>Different Hardware used:</strong> Using the heat map in figure 1 below, where the x-axis represents time, and the y-axis indicates usage, we discovered that most servers run at 10–15% CPU utilization. As seen by the dark box on top, few servers run at 35–45% CPU usage. After studying this data, we confirmed that the server’s CPU utilization varies by ~50%.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ApVt6cZWraib_tFx0KwLrQ.jpeg" /><figcaption><em>Figure 1. The heat map of CPU usage of a service</em></figcaption></figure><p>2. <strong>Minute-level change in the traffic pattern:</strong> Inconsistencies in the production environment are caused by traffic changes based on client activities. User activity on our sites is higher during the day when there is an immediate burst of traffic for a brief period. For example, a full cache refresh or bot activity. <br> <br>3.<strong> Regular data growth: </strong>Business is constantly growing. As new suppliers get added, new information gets created.</p><p>4. <strong>Experiment permutations:</strong> We conduct several tests that cause the static number to change every day. The permutations of these trials have an impact on the service’s performance.</p><p>5. <strong>Other factors</strong> include:</p><ul><li>Round-robin per layer introduces additional variance in load (<a href="https://en.wikipedia.org/wiki/Balls_into_bins_problem">N bins M balls problem</a>).</li><li>Garbage Collection (GC) pressure<strong> </strong>can lead to primary overload due to request queueing during GC.</li><li>Dependencies slowness<strong> </strong>causes internal concurrencies like contention and bottleneck to go up.</li></ul><h4><strong>How can we fix the overloaded situation?</strong></h4><p>We have two options to fix the overloaded situation.</p><ol><li>Use Kubernetes or OpenStack to scale out the service elastically. This fixes the capacity problem, but it is not the best solution for traffic spikes caused by bots because spawning a new service box takes time.</li><li>By degrading the response of our service. This can be done in two ways. The first step is to implement reactive solutions. The second way is by graceful degradation.</li></ol><p>The following are a few examples of reactive and degradation procedures utilized in the industry:</p><p><strong>The reactive solutions include:</strong></p><ul><li>Propagating TTL (time to live, request timeout) per request to avoid unnecessary work. Stop processing requests further if they have already reached TTL.</li><li>Propagating Deadlines — e2e TTL.</li><li>Applying retry quota and backoff. Each client can retry up to X% of requests.</li><li>Applying rate limiters on cluster level or machine levels.</li><li>Applying circuit breakers.</li></ul><p><strong>Graceful Degradation techniques include:</strong></p><ul><li>Traffic shedding (dropping requests — availability degradation).</li><li>Traffic prioritization (booking traffic/user traffic over bot).</li><li>Protection from retry-storm by dropping retries.</li><li>Back-pressure (final protection based on current buffers / input queue busyness / inflight requests).</li><li>Cut off functionality (feature degradation).</li><li>Returning stale results from the cache (stale data) — consistency degradation.</li></ul><h4><strong>How Agoda solves graceful degradation approach via the gatekeepers.</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/209/1*RT5d-DJj5koAfKJYeeFQ4g.png" /></figure><p>The gatekeeper acts as ‘<em>good cop, bad cop</em>.’ It keeps track of current service utilization in real-time. When the service’s capacity exceeds some specified limits, it starts rejecting incoming requests. It is a traffic shedding library.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/468/1*zdvHyqYXoHdteYiELNkyuA.png" /><figcaption>Figure 2: Bird-eye view of how service works with Success Rate (SR)</figcaption></figure><p>Let us suppose a realistic success rate under a standard load is 99.95%. The service success rate decreases as the load increases. Now, consider a reduction to 87.46%, as seen in the graph above. If we add additional loads to the service, it will become unresponsive and may even terminate. This is when we need to implement an adaptive strategy.</p><p>This library assesses the real-time service capacity and degrades response based on specified rules. The service now provides all traffic within the threshold limits due to the library. However, when above limits, it will use probability rejection to reject everything, making the service more adaptive to changes in traffic volume.</p><h4><strong>How is adaptive load shedding done in different industries?</strong></h4><p>Different industries have different approaches to adaptive load shedding</p><p>1. Google<a href="https://landing.google.com/sre/sre-book/chapters/handling-overload"> claims</a> it mostly uses CPU to determine the cost of request:</p><p>a) In platforms with garbage collection, memory pressure naturally translates into increased CPU consumption.</p><p>b) In other platforms, it is possible to provision the remaining resources in such a way that they are very unlikely to run out before the CPU runs out.</p><p>2. Facebook is focused on concurrent (inflight) requests.</p><p>3. Amazon (AWS lambda)<a href="https://aws.amazon.com/builders-library/using-load-shedding-to-avoid-overload/"> predicts</a> the number of resources per call with resource isolation.</p><p>4. Our pricing service (current backpressure) uses max in-flight requests as a hard cap.</p><h4><strong>Meta-principles that drive our adaptive logic in traffic shedding library</strong></h4><p>There are certain checklists that we follow that drive our adaptive logic in the traffic shedding library. This can be summarized in the following points:</p><ol><li>Regular workloads should not be harmed. Serve as much as possible, utilize say +95%.</li><li>Maintain prioritization among different traffic categories (Quality of Service). If there is sheddable traffic, do not reject vital or routine requests.</li><li>Ad hoc solutions and static numbers should be avoided. Applications have different workloads, performances, different traffic types, and volumes depending on data centres. Thus, relying on predefined numbers is not a solution when it comes to dynamic traffic.</li><li>Keep internal success rate above threshold while maximizing the external success rate</li></ol><ul><li>Internal success rate is service level success rate that is driven by SLO. Success rate of service as SRint and can be calculated as,</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/167/1*3oWNuVGB0gcGKnJBsINskQ.png" /><figcaption>Formula 1: Internal Success rate</figcaption></figure><ul><li>External success rate is success rate as perceived by client. This success rate is on the library level. This means the library needs to reject as less as possible to keep up with SLO of the service. Let us denote it by SRext,</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/212/1*fzMkvzx-j2d6-XPu55se1Q.png" /><figcaption>Formula 2: External Success rate</figcaption></figure><p><strong>Preliminary analysis and validations</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/616/1*V0AbNEhSJaTa0HwLqGYk6Q.png" /><figcaption>Table 1: Traffic Distribution of diverse types of traffics</figcaption></figure><p>To show you how distribution differs across data centers, let us take a real example of Agoda’s traffic distribution on two data centers in a single day.</p><p>Notice that we need a dynamic number for each data center as we cannot assign a single threshold number for all the data centers. We will now examine how services perform with load test results around the edge.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/781/1*fd8AP6bnBAWVUHNbHCNskA.png" /></figure><p>After plotting load test result for success rate over time (graph 2), we observed four distinct stages: warmup, perform, edge and overload.</p><ul><li>In warmup, — the service performs as expected. The success rate on graph 2 shows ~100%.</li><li>For perform — the performing stage where service is closer to the edge and still performs or recovers as expected.</li><li>For edge — the service will not be able to return to a healthy state (high success rate) without a reduced load.</li><li>For overload — the service will have low success rates and availability.</li></ul><p>Our goal is to keep our services stable, going from performing into edging and back to the performing stage.</p><p>If we follow the yellow line that indicates the beginning of the stressful edging zone and correlate it to the RPS graph (graph 1), the total request per second at the edging point is ~125. Now, in the CPU utilization plot (graph 3), the CPU utilization is ~80%, with a +/- 10% deviation. We can also see that the service performance degrades after 90% when we correlate the overload point (red line) in success rate graph (graph 2). This is the point when we lose our service.</p><p>Plotting a graph by normalizing RPS measurements against CPU utilization (see graph 4) shows the RPS plateau at 150, indicating that our service is CPU bound. Note the inflight requests (graph 5) is at 35–40 in the performance zone. When we normalize data against CPU (graph 6), it plateaus about 40–45 requests.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/744/1*EOFM8yxfJC7bXANoTqvYBA.png" /></figure><p>We have learned from this preliminary investigation that we can consider RPS/CPU as capacity prediction and cap it at maximum inflight requests. In addition, we also need to consider different utilization signals, queueing theory, concurrency, feedback, throughput, latency, and error rate.</p><h4><strong>Conclusion</strong></h4><p>Overloading can occur for many reasons, including customers initiating several retry attempts, an under-scaled service, etc. In this post, we have seen various parameters that affect the overall service performance, and we have also covered our initial investigation. In the future article, we will cover different approaches that we use for adaptive load shedding.</p><p>Authors: <a href="https://medium.com/u/a964d2d6f98">Sushmi Shrestha</a>, <a href="https://medium.com/u/27c8f958f7">Evgeniy Kalashnikov</a></p><p>References:</p><ul><li><a href="https://grpc.io/blog/deadlines/">gRPC and Deadlines</a></li><li><a href="https://aws.amazon.com/builders-library/using-load-shedding-to-avoid-overload/">Using load shedding to avoid overload</a></li><li><a href="https://sre.google/sre-book/handling-overload/">Google SRE: Load Balancing with Client Side Throttling</a></li><li><a href="https://en.wikipedia.org/wiki/Little%27s_law">Little&#39;s law - Wikipedia</a></li><li><a href="https://netflixtechblog.medium.com/performance-under-load-3e6fa9a60581">Performance Under Load</a></li><li><a href="https://learning.oreilly.com/library/view/ship-it/9781680500349/">Ship it!</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8c4c3b0eacf4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/agoda-engineering/adaptive-load-shedding-8c4c3b0eacf4">Adaptive Load Shedding</a> was originally published in <a href="https://medium.com/agoda-engineering">Agoda Engineering &amp; Design</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Improving performance using distributed cache with Couchbase]]></title>
            <link>https://medium.com/agoda-engineering/improving-performance-using-distributed-cache-with-couchbase-9014e237611f?source=rss-a964d2d6f98------2</link>
            <guid isPermaLink="false">https://medium.com/p/9014e237611f</guid>
            <category><![CDATA[distributed-cache]]></category>
            <category><![CDATA[caching]]></category>
            <category><![CDATA[engineering]]></category>
            <category><![CDATA[cache]]></category>
            <category><![CDATA[performance-improvement]]></category>
            <dc:creator><![CDATA[Sushmi Shrestha]]></dc:creator>
            <pubDate>Thu, 05 Mar 2020 09:19:34 GMT</pubDate>
            <atom:updated>2020-06-01T15:42:25.313Z</atom:updated>
            <content:encoded><![CDATA[<p>— Authors: <a href="https://medium.com/u/d42e3fae3cd">Ches Martin ♞</a> , <a href="https://medium.com/u/a964d2d6f98">Sushmi Shrestha</a></p><p>Agoda’s Price Delivery System serves hotel room prices for our web, mobile and affiliate APIs, handling over a million requests per second in five data centers across the globe.</p><p>As traffic from these edge clients grew over time, we noticed increasing response times felt by our customers. We set out to find the cause of this trend, and in the end we were able to improve PDS response by 20%. In this article we’ll show you how.</p><h3>Identifying the Problems</h3><p>First, we identified the components that could be improved and categorized them into two main flows:</p><ol><li>Metadata retrieval : fetching information from data sources to calculate price</li><li>Price calculation : all business logic evaluating hotel room prices</li></ol><p>Teams broke these down to tackle optimizations separately. This article’s focus is the metadata retrieval process.</p><p>When retrieving metadata PDS instances used local in-memory caches. To measure the computation and I/O characteristics of this flow, we added timing and cache efficiency metrics.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/852/0*LeRqW2mX2cYBHCdd" /><figcaption>Flow components and latency of system before improvement</figcaption></figure><p>Once we started to collect our measurements in production, we observed higher metadata retrieval times than we expected. The 99th-percentile of total API response time was 460 milliseconds, of which metadata retrieval took 110. <em>The cache hit ratio was only around 50%, so by improving that we knew we could reduce the 99P of retrieval.</em></p><p>Additionally, application cold starts caused cache misses that could result in stampedes on the database, increasing its latency and compounding the problem.</p><p>We recognized that we could reduce the 99P of metadata retrieval response by improving cache hit ratio and that is what we wanted to solve by taking following steps.</p><h3>Solving the Low Hit Rate</h3><p>Further analysis showed that our cache hit ratio was being hurt by frequent cache evictions. Traffic from affiliates, which includes broad availability and price searches, contributed to high variation in requests to the PDS. We were using a Least Recently Used (LRU) strategy to evict data when the caches filled, and the variation caused evictions to occur at a high rate.</p><p>To reduce evictions, it was evident the system required more cache capacity. According to calculations for the complete set of hotels, metadata size was about 5 GB, and we anticipated it would increase with new business features related to pricing.</p><p>In summary, our 99P response time suffered from a low cache hit ratio, due to a high eviction rate, caused by request variability and insufficient cache capacity.</p><p>This problem can be reduced by picking up a suitable cache topology for our scenario.</p><p>There are different types of caching topologies to solve these problems. Let’s go through different kinds of caching we already know before we jump into the decision.</p><h4>Standalone In-Memory Cache</h4><p>This is the simplest kind of cache topology. This is the one we have in our existing solution as described in the problem section. Each API instance holds its own cache in-memory on its host server.</p><h4>Distributed (client-server) cache</h4><p>In this topology, the cache is external and the service uses a client library to access data from the centralized cache over a network protocol. This type of topology provides data consistency, but it adds latency since data needs to be fetched from a remote host.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/354/0*RIGSagLiveWbcGN1" /><figcaption>Distributed client-server cache</figcaption></figure><h4>Replicated (in-process) cache</h4><p>Cache is in-memory however cache data in different instances of the API are synchronized through a client library behind the scenes. This means the change in one cache is propagated to the other instances. This will certainly have good responsiveness, better fault tolerance than centralized but introduces data inconsistency between instances assuming replication is asynchronous.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/523/0*BmSNFznjHXJTsqOd" /><figcaption>Replicated cache</figcaption></figure><h4>Near-cache hybrid</h4><p>In this type, two cache layers are maintained, local and remote. The local cache will be of small size and whenever data doesn’t exist in the local cache, it will fall back to the remote cache.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/354/0*955jH8VyJQriMawh" /><figcaption>Near cache hybrid</figcaption></figure><p>Different caching topologies have their own strengths and drawbacks. After diagnosing the issue of PDS, we require a fast and high-capacity cache. The other requirements for the system are data consistency and sustaining a high update rate. Considering these constraints, we choose the distributed client-server cache architecture because it fits our purpose. However, this topology has low fault tolerance, so we definitely need a cache technology that minimizes the latency, optimizes the performance and improves the fault tolerance.</p><p>Couchbase fit our purpose. Couchbase is an in-memory fast cache that supports key-value storage and easily supports a high volume of concurrent requests. Couchbase provides fault tolerance by replicating data into multiple clusters. Besides, masterless architecture provides easy scaling. Another reason we chose Couchbase is that we already had the support inside Agoda, which means the adoption and learning curve is shorter.</p><h3>Solving Cold Cache Challenges</h3><p>The existing local cache architecture used a write-behind strategy to fill the cold cache. <em>Application cold starts hurt cache hit rate, and put pressure on source DB that increases latency. </em>With this strategy, the API starts with empty cache, and on cache miss the requests fall back to the database and the metadata is written into cache asynchronously.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/337/0*OmkK4CK_6WcnKeV2" /><figcaption>In-memory with write-behind cache strategy</figcaption></figure><p>Even if we could continue to fit the data set in memory, we also needed to assess whether there was a more optimal strategy than write-behind for the hit ratio in our scenario.</p><p>We needed to figure out a caching strategy, whether the existing write-behind with cold cache was efficient for this scenario. There are different caching strategies to populate cache stores in any topology that we might choose for.</p><h3>Caching Strategies Defined</h3><h4>Read-Through Caching</h4><p>In this type of caching strategy, the request will be tried to be fulfilled from cache entry. If the data is not found in cache, data will be loaded from the underlying data source.</p><h4>Write-Through Caching</h4><p>This strategy is used while updating data. The change is first updated in the cache and then pushed down to the underlying database.</p><h4>Write-Behind Caching</h4><p>As described for our initial architecture, write-behind caching is when data in cache is written asynchronously.</p><h4>Pre-caching</h4><p>In this scenario data is loaded into cache before the application is ready to serve any requests. The cache can be partially filled, called a warm cache, or if completely filled then it is called a hot cache.</p><p>This existing write-behind technique is efficient when requests are consistent and the subsequent requests are quite similar so that new requests have a high chance of getting data from cache. As one of the end-clients are our affiliates, their search requests introduce huge variation. Not only that, cold start causes huge load on the database. We should be maintaining a hot cache to avoid the fallback calls to the database which increase latency.</p><h3>Pre-caching Implementation</h3><p>Let’s get into detail of how we maintain a total cache of the Price Delivery data centralized in Couchbase. We allocate Couchbase clusters on each datacenter since cross-datacenter queries would have high latency. Also, Couchbase needs to be hot, so we implemented a sync system to push data from the database into these caches.</p><figure><img alt="Precaching" src="https://cdn-images-1.medium.com/max/1000/1*w0z7e9ZFN3Ns5KeBXe86jw.png" /><figcaption>Pre-caching system</figcaption></figure><p>The data we populate into cache, called metadata, needs to be updated frequently to capture the changes occurring in primary database records, thus keeping the cache fresh. So the sync system is scheduled to run every twenty minutes, and it fully syncs the source data every time. This may sound inefficient but the cost to determine differential updates correctly was much higher than refreshing the whole set of data. This was mainly because of the complexity of how we calculate metadata: to implement change tracking across all the related tables would be a substantial project.</p><p>This sync system that fills up the Couchbase cache has different components, which we call a Scheduled Producer, Pre-cache Builders (consumers), and a Shared Queue.</p><p>The producer is a simple component that produces property IDs that need to be synced in a certain predefined period of time. With the Scheduled Producer, the property IDs are pushed into a shared queue. Since Agoda has millions of hotels to sync, a single consumer would be a bottleneck. Multiple instances of the Precache Builder consumer are spawned and share work on the queue of property IDs, preparing metadata needed for the pricing system and writing it into the cache.</p><p>This queue also controls the rate of DB requests from this application, no cache stampede effect on cold application starts.</p><p>For the queue, we chose Apache Kafka for its high throughput and fault tolerance. It is a distributed streaming platform and supports publishing and subscribing to a stream of records.</p><h3><strong>Result</strong></h3><p>This pre-caching system improved the total response time by approximately 20% overall, as expected. This was possible only with the fast total cache. This means no fallback to database and latency for metadata delivery from cache was reduced to approximately 15ms in 99th percentile.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/728/0*3YIjgV_0Iu9_nwe0" /><figcaption>Read time of metadata over a typical 6-hour period</figcaption></figure><p>We identified the cache hit ratio problem caused by limited cache size. The limited cache size made 50% of requests to fetch data from the database which was the main problem. This problem was fixed by the changing local cache to distributed cache topology and pre-caching strategy. The distributed cache topology gave us bigger cache size and pre-caching reduced the cache miss to zero thus giving better latency on metadata retrieval.</p><h3>Future</h3><p>This is the story of how we improved the system performance by adding a cache layer between persistent datastore and service. But we still have challenges to be solved. The challenges are related to scalability, and maintaining up-to-date data in cache.</p><h4>Scalability</h4><p>The size of metadata is increasing as new business features are added. With the increase in size, the time will also increase to fetch and write data into cache. This will definitely reduce the performance of the Pre-cache Builders.</p><h4>Cache freshness</h4><p>Cache freshness is the main requirement of the pricing system. In the course of time, the number of hotels will increase so the time for a full sync will begin to run over the freshness requirement. This means hotel metadata will be outdated already before the Pre-cache Builder updates the information for the hotel. Again adding consumers to the pool seems to be a good idea but the database is a bottleneck and it cannot be scaled easily.</p><p><strong>References</strong></p><ul><li><a href="https://www.couchbase.com/">Home</a></li><li><a href="https://kafka.apache.org/">Apache Kafka</a></li><li><a href="http://shop.oreilly.com/product/0636920032175.do">Designing Data-Intensive Applications</a></li><li><a href="https://twitter.com/markrichardssa">Mark Richards</a></li><li><a href="https://learning.oreilly.com/library/view/intelligent-caching/9781492049067/">Intelligent Caching</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9014e237611f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/agoda-engineering/improving-performance-using-distributed-cache-with-couchbase-9014e237611f">Improving performance using distributed cache with Couchbase</a> was originally published in <a href="https://medium.com/agoda-engineering">Agoda Engineering &amp; Design</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to learn new things]]></title>
            <link>https://medium.com/@sushmi.sus/how-to-learn-new-things-8010ef4eb9b3?source=rss-a964d2d6f98------2</link>
            <guid isPermaLink="false">https://medium.com/p/8010ef4eb9b3</guid>
            <category><![CDATA[learning]]></category>
            <dc:creator><![CDATA[Sushmi Shrestha]]></dc:creator>
            <pubDate>Thu, 13 Jun 2019 04:29:04 GMT</pubDate>
            <atom:updated>2019-06-13T12:34:30.761Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Lsk_7N63mLEBdjd-ZxjNfQ.png" /></figure><p>Recently, I have taken coursera class “Learning about learnings”. In this post, I will summarise the main points that I learned during the class and enjoyed adding some tips to my daily life.</p><p>To begin with some background, our brain is able to store new subject matters and later commit to long-term memory. For this there is process, whenever we start to study fresh topics, our prefrontal part is active. The prefrontal part absorbs the information but this facts learned is not stored in permanent. So the break for example sleeping we take after will help to push all these newly learned things into another part of brain from where we can recall it from later.</p><p>Recalling is not easy either. One needs deliberate practice. To strengthen the memory recall, try to think about topics without going through easy notes. This can also be made easier if these topics are linked with some images or hints that is familiar. For instance, recalling names can be easier if we can associate person’s name or characteristics with someone we are familiar. The person might have same name that your aunt has.</p><p>Another important topic is interleaving — learning over time. Studying difficult studies everyday or regularly for an hour or some period will assist in acquiring the knowledge in long run. Cramming up the subject matters a night before exam can help to solve problems in exam but later after exam, we won’t remember the content. Learning bit by bit over a long time is the best way to learn difficult subjects.</p><p>I personally like the two techniques explained in the course. The first one is Pomodoro. This technique suggests to turn of all distraction and focus learning for undisrupted 25 minutes and reward yourself later. Adopting this habit during learning had made my learning easier. This way I am able to focus on learning process than on the content that triggers the pain. Following the process will help to forget about the pain which cues the procrastination.</p><p>The second technique — listing out tomorrows task before going to bed is my favorite one that I start to continue and it actually helps to achieve my goal. Taking few minutes to sort out what I am going to work on tomorrow and listing down onto my notes helped me to finish the work and not get distracted. There is some power related to sleeping, that prepares your brain to work on the list for tomorrow — the zombie mode of brain.</p><p>Finally, I really like to thank Dr. Barbara Oakley and Dr. Terrance Sejnowski for making this course easy to understand and follow. I suggest students to go through the videos, it will help to those who have hard time in learning new things.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8010ef4eb9b3" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>