How Reddit Works
Reddit is a large set of discussion boards where people post, vote, and reply in long threads. Every vote can change the order of a board, so the hard part is to keep these lists correct and fast while many people vote on the same popular posts. The article can differ from the real system,Source 1সোর্স 1 and its later sections are paid. So for comments, this page uses a 2017 talk by a Reddit engineer.Source 2সোর্স 2
8 min read8 মিনিটে পড়া যায় · 9 sections9টি সেকশন · 2 sources2টি সোর্স · updated Nov 2026আপডেট: Nov 2026
Vote queues and locksভোট কিউ আর লক
Split a clogged vote queue into 10 and watch the lock fights drop, until one hot list is slow again.জমে যাওয়া ভোট কিউকে 10 ভাগ করুন আর দেখুন লকের লড়াই কমে, যতক্ষণ না একটা হট লিস্ট আবার ধীর হয়।
You’ll learnআপনি শিখবেন
- Why a vote update needs a lockভোট আপডেটে কেন লক লাগে
- Why more processors can make it worseআরও প্রসেসর কেন খারাপ করতে পারে
- How board ID mod 10 splits the queueবোর্ড ID mod 10 কীভাবে কিউ ভাগ করে
- Why one shared list keeps the p99 slowএকটা ভাগ করা লিস্ট কেন p99 ধীর রাখে
The problem in plain words
Reddit started small. In June 2005, two university students first pitched a food ordering idea, were turned down, and built a social site in its place.Source 1সোর্স 1 At first, the whole site ran on one machine, with its data in a Postgres database.Source 1সোর্স 1 Later, they moved the app and the database to separate machines.Source 1সোর্স 1
Growth then caused two problems. First, one database and one big codebase could not keep up.Source 1সোর্স 1 Second, popular posts got so many votes and comments that the newest data appeared late.Source 1সোর্স 1
The scale explains why. In 2017, the speaker said Reddit served 320 million users each month. He also said users posted about a million times a day and cast 75 million votes.Source 2সোর্স 2 The subtitle of the article speaks of 100 million daily users.Source 1সোর্স 1
সহজ English
Reddit started small. In June 2005, two university students first pitched an idea for food ordering. The idea was turned down, so they built a social site in its place.Source 1সোর্স 1 At first, the whole site ran on one machine. Its data was in a Postgres database.Source 1সোর্স 1 Later, the app and the database moved to separate machines.Source 1সোর্স 1
Then growth caused two problems. One database and one big codebase could not keep up.Source 1সোর্স 1 Also, popular posts got so many votes and comments that the newest data showed late.Source 1সোর্স 1
The scale tells you why. In 2017, a speaker said that Reddit served 320 million users each month. He also said that users posted about a million times a day and cast 75 million votes.Source 2সোর্স 2 The subtitle of the article speaks of 100 million daily users.Source 1সোর্স 1
বাংলা ব্যাখ্যা
Reddit শুরু হয়েছিল ছোট আকারে। June 2005-এ দুজন university-ছাত্র প্রথমে একটি food ordering idea উপস্থাপন করেন। সেটি গৃহীত হয়নি, তাই তাঁরা তার বদলে একটি social site তৈরি করেন।Source 1সোর্স 1 শুরুতে পুরো site একটি machine-এ চলত, আর data থাকত একটি Postgres database-এ।Source 1সোর্স 1 পরে app আর database আলাদা machine-এ সরানো হয়।Source 1সোর্স 1
এরপর বৃদ্ধির ফলে দুটি সমস্যা দেখা দেয়। প্রথমত, একটি database আর একটি বড় codebase আর তাল মেলাতে পারছিল না।Source 1সোর্স 1 দ্বিতীয়ত, জনপ্রিয় post-গুলোতে এত vote আর comment আসত যে নতুন data দেরিতে দেখা যেত।Source 1সোর্স 1
Scale দেখলে কারণটি বোঝা যায়। 2017 সালে speaker বলেন, Reddit প্রতি মাসে 320 million user-কে service দিত। তিনি আরও বলেন, user-রা দিনে প্রায় এক million বার post করতেন এবং 75 million vote দিতেন।Source 2সোর্স 2 Article-এর subtitle-এ দৈনিক 100 million user-এর কথা বলা হয়েছে।Source 1সোর্স 1
The big picture
[Browser / app] --> [CDN] --> [Load balancer] --> [App servers]
| | |
+----------------------------+ | +-----------------+
v v v
[Cache: ranked lists] [Postgres primary [Job queue]
[and post objects] + read replicas] |
^ ^ v
| | [Processors]
+--------------------------------+--------------------+
processors update the cache and the databaseA request passes a CDN and a load balancer, then reaches an app server.Source 2সোর্স 2 The app server reads ranked lists from the cache.Source 1সোর্স 1 It reads a post from the cache first, and goes to the database only on a miss.Source 2সোর্স 2 Slow work, such as a new post or a vote, goes into a job queue. Background processors take each job and update the database and the cache later.Source 1সোর্স 1
সহজ English
A request first passes a CDN and a load balancer. Then it reaches an app server.Source 2সোর্স 2 The app server reads the ranked lists from the cache.Source 1সোর্স 1 To get a post, it reads the cache first. It goes to the database only when the cache does not have the post (a miss).Source 2সোর্স 2
Slow work, such as a new post or a vote, goes into a job queue. Background processors take each job. Later, they update the database and the cache.Source 1সোর্স 1
বাংলা ব্যাখ্যা
একটি request প্রথমে একটি CDN আর একটি load balancer পার হয়, তারপর একটি app server-এ পৌঁছায়।Source 2সোর্স 2 App server cache থেকে ranked list-গুলো পড়ে।Source 1সোর্স 1 একটি post পড়তে সে আগে cache দেখে, আর cache-এ না পেলে (miss হলে) তবেই database-এ যায়।Source 2সোর্স 2
ধীর কাজ, যেমন একটি নতুন post বা একটি vote, একটি job queue-তে যায়। Background processor-গুলো প্রতিটি job নেয় এবং পরে database আর cache update করে।Source 1সোর্স 1
Growing past one machine
Think of a small café that gets famous. First, you hire more waiters. Then you buy a bigger stove. A bigger stove has a limit, so in the end you open a second kitchen.
Reddit did the same. It added more app servers and put a load balancer in front of them. A load balancer shares requests among servers.Source 1সোর্স 1 It made the database server bigger, which is called vertical scaling. That has a hardware limit, so Reddit then split the database into parts to spread the writes.Source 1সোর্স 1 It also added replicas, which are read-only copies of the database, to serve more reads.Source 1সোর্স 1
The talk adds detail about the real system. The main database holds accounts, links, subreddits, and comments in Postgres, with memcache in front.Source 2সোর্স 2 Memcache is a fast in-memory cache. In the database cluster, the primary servers take the writes. Read-only replicas copy its data with a short delay, which is called asynchronous replication.Source 2সোর্স 2
সহজ English
Think of a small café that gets famous. First, you hire more waiters. Then you buy a bigger stove. A bigger stove has a limit, so in the end you open a second kitchen.
Reddit did the same. It added more app servers and put a load balancer in front of them. A load balancer shares the requests among the servers.Source 1সোর্স 1 It made the database server bigger. This is called vertical scaling. That has a hardware limit. So Reddit then split the database into parts to spread the writes.Source 1সোর্স 1 It also added replicas to serve more reads. A replica is a read-only copy of the database.Source 1সোর্স 1
The talk tells more about the real system. The main database keeps accounts, links, subreddits, and comments in Postgres. Memcache sits in front of it.Source 2সোর্স 2 Memcache is a fast cache in memory. The primary servers take the writes. The read-only replicas copy the data with a short delay. This is called asynchronous replication.Source 2সোর্স 2
বাংলা ব্যাখ্যা
একটি ছোট café-এর কথা ভাবুন, যেটি হঠাৎ বিখ্যাত হয়ে গেল। প্রথমে আপনি আরও waiter নিয়োগ করেন। তারপর একটি বড় চুলা কেনেন। বড় চুলারও একটি সীমা আছে, তাই শেষে আপনি দ্বিতীয় একটি রান্নাঘর খোলেন।
Reddit-ও একই কাজ করেছিল। এটি আরও app server যোগ করে এবং সেগুলোর সামনে একটি load balancer বসায়। Load balancer request-গুলো server-গুলোর মধ্যে ভাগ করে দেয়।Source 1সোর্স 1 Reddit database server-কে আরও বড় করে, যাকে vertical scaling বলে। এর একটি hardware সীমা আছে, তাই পরে Reddit write-গুলো ছড়িয়ে দিতে database-কে কয়েকটি ভাগে ভাগ করে।Source 1সোর্স 1 আরও বেশি read সামলাতে এটি replica-ও যোগ করে। Replica হলো database-এর read-only copy।Source 1সোর্স 1
Talk-টি আসল system সম্পর্কে আরও বিস্তারিত জানায়। মূল database Postgres-এ account, link, subreddit আর comment রাখে, আর এর সামনে থাকে memcache।Source 2সোর্স 2 Memcache হলো একটি দ্রুত in-memory cache। Database cluster-এ primary server-গুলো write নেয়। Read-only replica-গুলো অল্প দেরিতে তার data copy করে, যাকে asynchronous replication বলে।Source 2সোর্স 2
Slow work goes into a queue
Think of a dry cleaner. You hand over your shirt and get a ticket at once. The cleaning happens later, in the back room. You do not stand at the counter and wait.
A new post is expensive work. Reddit must update several tables, such as posts, subreddits, and accounts. Each post must also pass rate limits and spam filters.Source 1সোর্স 1 So the app server puts a message in a job queue and replies to the user. A processor takes the job later, does the work, and updates the databases.Source 1সোর্স 1 The talk names the queue software: RabbitMQ.Source 2সোর্স 2
সহজ English
Think of a dry cleaner. You give your shirt and get a ticket at once. The cleaning happens later, in the back room. You do not stand at the counter and wait.
A new post is expensive work. Reddit must update several tables, such as posts, subreddits, and accounts. Each post must also pass rate limits and spam filters.Source 1সোর্স 1 So the app server puts a message in a job queue and replies to the user. Later, a processor takes the job, does the work, and updates the databases.Source 1সোর্স 1 The talk names the queue software: RabbitMQ.Source 2সোর্স 2
বাংলা ব্যাখ্যা
একটি dry cleaner-এর কথা ভাবুন। আপনি shirt জমা দেন এবং সাথে সাথে একটি ticket পান। ধোয়ার কাজ হয় পরে, পেছনের ঘরে। আপনাকে counter-এ দাঁড়িয়ে অপেক্ষা করতে হয় না।
একটি নতুন post তৈরি করা ব্যয়বহুল কাজ। Reddit-কে কয়েকটি table update করতে হয়, যেমন posts, subreddits আর accounts। প্রতিটি post-কে rate limit আর spam filter-ও পার হতে হয়।Source 1সোর্স 1 তাই app server একটি job queue-তে একটি message রাখে এবং user-কে উত্তর দিয়ে দেয়। পরে একটি processor job-টি নেয়, কাজটি করে এবং database-গুলো update করে।Source 1সোর্স 1 Talk-এ queue software-টির নাম বলা হয়েছে: RabbitMQ।Source 2সোর্স 2
Ranked lists of posts
Every board and the front page show an ordered list of posts.Source 1সোর্স 1 The order comes from a function named "hot", which takes the up votes and down votes of each post.Source 1সোর্স 1 To sort all posts in the database for each page view would be slow.Source 1সোর্স 1
Think of a library that prints a "top 100 books" sheet. The library does not count all loans each time someone asks. It keeps the printed sheet and changes one line when a loan changes the order.
Reddit keeps each list in the cache as post IDs with their rank. To show the page, it fetches each post by its ID, which is fast.Source 1সোর্স 1 One post can appear in many lists. So background jobs build each list ahead of time and save it in the cache.Source 1সোর্স 1 Reddit also keeps popular lists in Cassandra, a distributed database, so they are not lost.Source 1সোর্স 1
The talk explains the trick. When a vote arrives, the processor already knows the new score. It reads the saved list, moves the post to its new place, and writes the list back.Source 2সোর্স 2 The speaker says that at this point the list is no longer a true cache. It is stored data in its own right, and, as of the 2017 talk, it lived in Cassandra.Source 2সোর্স 2
সহজ English
The front page and every board show an ordered list of posts.Source 1সোর্স 1 A function named "hot" sets the order. It uses the up votes and down votes of each post.Source 1সোর্স 1 It would be slow to sort all posts in the database for each page view.Source 1সোর্স 1
Reddit keeps each list in the cache as post IDs with their rank. To show the page, it gets each post by its ID. This is fast.Source 1সোর্স 1 One post can be in many lists. So background jobs build each list ahead of time and save it in the cache.Source 1সোর্স 1 Reddit also keeps popular lists in Cassandra, a distributed database, so that they are not lost.Source 1সোর্স 1
When a vote comes in, the processor already knows the new score. It reads the saved list, moves the post to its new place, and writes the list back.Source 2সোর্স 2 The speaker says that then the list is not really a cache. It is stored data of its own, and, as of the 2017 talk, it was in Cassandra.Source 2সোর্স 2
বাংলা ব্যাখ্যা
Front page আর প্রতিটি board post-গুলোর একটি সাজানো list দেখায়।Source 1সোর্স 1 এই ক্রম ঠিক করে "hot" নামের একটি function, যা প্রতিটি post-এর up vote আর down vote নেয়।Source 1সোর্স 1 প্রতিবার page দেখার সময় database-এর সব post sort করা ধীর হতো।Source 1সোর্স 1
একটি library-র কথা ভাবুন, যারা "top 100 books"-এর একটি তালিকা ছাপে। কেউ চাইলেই library প্রতিবার সব loan গোনে না। তারা ছাপা তালিকাটি রেখে দেয়, আর কোনো loan ক্রম বদলালে শুধু একটি লাইন বদলায়।
Reddit প্রতিটি list cache-এ post ID আর তাদের rank হিসেবে রাখে। Page দেখাতে এটি প্রতিটি post তার ID দিয়ে আনে, যা দ্রুত।Source 1সোর্স 1 একটি post অনেক list-এ থাকতে পারে। তাই background job-গুলো আগেভাগেই প্রতিটি list তৈরি করে cache-এ save করে।Source 1সোর্স 1 জনপ্রিয় list-গুলো যাতে হারিয়ে না যায়, সেজন্য Reddit সেগুলো Cassandra-তেও রাখে, যা একটি distributed database।Source 1সোর্স 1
একটি vote এলে processor আগে থেকেই নতুন score জানে। সে save করা list পড়ে, post-টিকে নতুন জায়গায় সরায় এবং list আবার লিখে রাখে।Source 2সোর্স 2 Speaker বলেন, এই পর্যায়ে list-টি আর সত্যিকারের cache নয়। এটি নিজেই stored data, আর 2017-এর talk অনুযায়ী এটি Cassandra-তে থাকত।Source 2সোর্স 2
Votes, locks, and a traffic jam
Votes go through the job queue too.Source 1সোর্স 1 The "read, change, write" step is risky. If two processors change the same list at the same time, one change can overwrite the other. This is a race condition.Source 1সোর্স 1 So the update is done under a lock.Source 2সোর্স 2 Only one processor can hold a lock at a time, by definition of a lock. The article says Reddit used ZooKeeper for these locks.Source 1সোর্স 1
Locks caused a new problem. Think of one bathroom key at a busy office. More staff do not help. They only make the queue for the key longer.
In mid-2012, the vote queues backed up at peak hours. Scores on the front page rose slowly and caught up many hours later.Source 2সোর্স 2 The team added more processors, and it got worse.Source 2সোর্স 2 Timers in the code showed the cause. Many votes on popular boards waited for the same lock.Source 2সোর্স 2
The fix was to split the vote queue. Reddit took the board ID, divided it by 10, and used the remainder to choose one of 10 queues.Source 2সোর্স 2 The total number of processors stayed the same, but fewer processors fought for any one lock.Source 2সোর্স 2
The fix did not last. By late 2012, a few votes were slow again. The team found them only in the 99th percentile, the slowest 1 % of jobs.Source 2সোর্স 2 The new hot spot was a list of all links to one web domain, which crossed the board partitions.Source 2সোর্স 2 The later fix split each vote job into smaller messages, each on its own partition.Source 2সোর্স 2
সহজ English
Votes also go through the job queue.Source 1সোর্স 1 If two processors change the same list at the same time, one change can overwrite the other. This is a race condition.Source 1সোর্স 1 So the update is done under a lock.Source 2সোর্স 2 Only one processor can hold a lock at a time, by definition of a lock. The article says that Reddit used ZooKeeper for these locks.Source 1সোর্স 1
Locks caused a new problem: in mid-2012, the vote queues backed up at peak hours. Front-page scores caught up many hours later.Source 2সোর্স 2 More processors made it worse.Source 2সোর্স 2 Timers in the code showed that many votes on popular boards waited for the same lock.Source 2সোর্স 2
The fix split the vote queue into 10 queues. The remainder of the board ID divided by 10 chose the queue. Fewer processors then fought for any one lock.Source 2সোর্স 2
By late 2012, a few votes were slow again, only in the slowest 1 % of jobs.Source 2সোর্স 2 The new hot spot was a list of all links to one web domain, across the board partitions.Source 2সোর্স 2 The later fix split each vote job into smaller messages, each on its own partition.Source 2সোর্স 2
বাংলা ব্যাখ্যা
Vote-গুলোও job queue দিয়ে যায়।Source 1সোর্স 1 দুটি processor একই সময়ে একই list বদলালে একটির পরিবর্তন অন্যটিকে মুছে দিতে পারে। একে race condition বলে।Source 1সোর্স 1 তাই update-টি একটি lock-এর অধীনে করা হয়।Source 2সোর্স 2 lock-এর সংজ্ঞা অনুযায়ী একই সময়ে শুধু একটি processor একটি lock ধরে রাখতে পারে। Article অনুযায়ী Reddit এই lock-গুলোর জন্য ZooKeeper ব্যবহার করত।Source 1সোর্স 1
Lock একটি নতুন সমস্যা তৈরি করে। 2012-এর মাঝামাঝি peak hour-এ vote queue জমে যেত। Front page-এর score ধীরে বাড়ত এবং অনেক ঘণ্টা পরে ঠিক হতো।Source 2সোর্স 2 Team আরও processor যোগ করে, আর অবস্থা আরও খারাপ হয়।Source 2সোর্স 2 Code-এর timer দেখায় যে জনপ্রিয় board-গুলোর অনেক vote একই lock-এর জন্য অপেক্ষা করছিল।Source 2সোর্স 2
সমাধান ছিল vote queue ভাগ করা। Board ID-কে 10 দিয়ে ভাগ করে ভাগশেষ দিয়ে 10টি queue-এর একটি বাছাই করা হতো।Source 2সোর্স 2 মোট processor-এর সংখ্যা একই থাকে, কিন্তু কোনো একটি lock-এর জন্য কম processor লড়াই করে।Source 2সোর্স 2
এই সমাধান টেকেনি। 2012-এর শেষে কিছু vote আবার ধীর হয়ে যায়, শুধু 99th percentile-এ, অর্থাৎ সবচেয়ে ধীর 1 % job-এ।Source 2সোর্স 2 নতুন hot spot ছিল একটি web domain-এর সব link-এর একটি list, যা board partition-গুলোর সীমা পেরিয়ে যেত।Source 2সোর্স 2 পরের সমাধানে প্রতিটি vote job-কে ছোট ছোট message-এ ভাগ করা হয়, প্রতিটি তার নিজের partition-এ।Source 2সোর্স 2
Comment trees
This section uses the talk, because the article's comments section is behind the paywall.
Reddit comments are threaded. A reply sits under the comment that it answers, so a thread is a tree.Source 2সোর্স 2 A thread with 10,000 comments is costly to draw if the server must look up every comment and its parent.Source 2সোর্স 2 So Reddit saves the parent links of the whole tree in one place. It can then choose which part of the tree to show and load only those comments.Source 2সোর্স 2 Updates to this tree also run as background jobs, in batches.Source 2সোর্স 2
Order matters in a tree. A reply cannot attach to a parent that is not there yet.Source 2সোর্স 2 In early 2016, a huge news thread got its own fast queue. Older comments of that thread were still in the normal queue. The system saw missing parents and kept asking for repairs. The fast queue filled the memory of the message broker.Source 2সোর্স 2 The team had to restart the broker and lose the queued messages. After that, Reddit started to set quotas on its queues (as of 2017).Source 2সোর্স 2
সহজ English
This section uses the talk, because the comments section of the article is behind the paywall.
A reply sits under the comment that it answers. So a thread is a tree.Source 2সোর্স 2 A thread with 10,000 comments is costly to draw if the server must look up every comment and its parent.Source 2সোর্স 2 So Reddit saves the parent links of the whole tree in one place. Then it can choose which part to show, and load only those comments.Source 2সোর্স 2 Updates to this tree also run as background jobs, in batches.Source 2সোর্স 2
A reply cannot attach to a parent that is not there yet.Source 2সোর্স 2 In early 2016, a huge news thread got its own fast queue. The older comments of that thread were still in the normal queue. The system saw missing parents and kept asking for repairs. The fast queue filled the memory of the message broker.Source 2সোর্স 2 The team had to restart the broker and lose the queued messages. After that, Reddit started to set quotas on its queues (as of 2017).Source 2সোর্স 2
বাংলা ব্যাখ্যা
এই অংশে talk-টি ব্যবহার করা হয়েছে, কারণ article-এর comment অংশটি paywall-এর পেছনে।
Reddit-এর comment-গুলো threaded। একটি reply যে comment-এর উত্তর দেয়, তার নিচে বসে, তাই একটি thread হলো একটি tree।Source 2সোর্স 2 Server-কে যদি প্রতিটি comment আর তার parent খুঁজতে হয়, তাহলে 10,000 comment-এর একটি thread দেখানো ব্যয়বহুল।Source 2সোর্স 2 তাই Reddit পুরো tree-এর parent link-গুলো এক জায়গায় save করে। এরপর এটি tree-এর কোন অংশ দেখাবে তা বেছে নিয়ে শুধু সেই comment-গুলো load করতে পারে।Source 2সোর্স 2 এই tree-এর update-গুলোও background job হিসেবে, batch-এ চলে।Source 2সোর্স 2
Tree-তে ক্রম গুরুত্বপূর্ণ। যে parent এখনো নেই, তার সাথে একটি reply যুক্ত হতে পারে না।Source 2সোর্স 2 2016-এর শুরুতে একটি বিশাল news thread নিজের একটি দ্রুত queue পায়। সেই thread-এর পুরোনো comment-গুলো তখনো সাধারণ queue-তে ছিল। System parent খুঁজে না পেয়ে বারবার repair চাইছিল। দ্রুত queue-টি message broker-এর memory ভরে ফেলে।Source 2সোর্স 2 Team-কে broker restart করতে হয় এবং queue-তে থাকা message-গুলো হারাতে হয়। এরপর Reddit তার queue-গুলোতে quota বসাতে শুরু করে (2017 অনুযায়ী)।Source 2সোর্স 2
Key words
| Word | Plain meaning |
|---|---|
| Database | The permanent store of posts, comments, users, and votes |
| Replica | A read-only copy of a database that serves extra reads |
| Cache | Fast memory that keeps ready answers, such as ranked lists |
| Job queue | A waiting line for slow work, which background processors handle later |
| Processor | A background worker that takes jobs from a queue |
| Race condition | A bug where two workers change the same data at once and one change is lost |
| Lock | A rule that only one worker may change a piece of data at a time |
| Lock contention | Many workers that wait for the same lock |
| Partition | One part of data or work that is split by a key, such as a board ID |
| 99th percentile (p99) | The time under which 99 % of jobs finish. It shows the slowest jobs. |
What a tester can learn
Tutorial advice
These test ideas are the tutorial's own advice. They are not from the sources.
- Send many votes on one post from many users at once. Check that the final score is exact and that no vote is lost.
- Load test the vote path at peak traffic. Watch the queue length and the p99 time, not only the average.
- Measure the delay between a vote and the new order of the list. Set a limit for it, and test that the list catches up after a backlog.
- Post a reply to a comment that is deleted or not yet processed. Check that the tree does not break and does not loop on repairs.
- Fill one queue on purpose. Check that a quota stops it and that other features of the site still work.
- Stop the cache and check that pages still load from the database, and that the database survives the extra load.
সহজ English
These test ideas are the tutorial's own advice. They are not from the sources.
- Send many votes on one post from many users at the same time. Make sure that the final score is exact and that no vote is lost.
- Load test the vote path at peak traffic. Watch the length of the queue and the p99 time, not only the average.
- Measure the delay between a vote and the new order of the list. Set a limit for this delay. Test that the list catches up after a backlog.
- Post a reply to a comment that is deleted or not processed yet. Make sure that the tree does not break and does not repeat repairs in a loop.
- Fill one queue on purpose. Make sure that a quota stops it and that the other features of the site still work.
- Stop the cache. Make sure that pages still load from the database and that the database survives the extra load.
বাংলা ব্যাখ্যা
নিচের test ধারণাগুলো এই tutorial-এর নিজস্ব পরামর্শ। এগুলো source থেকে নেওয়া নয়।
- একই সময়ে অনেক user থেকে একটি post-এ অনেক vote পাঠান। দেখুন, শেষ score ঠিক আছে কি না এবং কোনো vote হারিয়ে যায় কি না।
- Peak traffic-এ vote path-এর load test করুন। শুধু average নয়, queue-এর দৈর্ঘ্য আর p99 time-ও খেয়াল করুন।
- একটি vote আর list-এর নতুন ক্রমের মধ্যে কত দেরি হয়, তা মাপুন। এই দেরির জন্য একটি সীমা ঠিক করুন, আর test করুন যে backlog-এর পরে list আবার ঠিক হয়ে যায়।
- মুছে ফেলা বা এখনো process না হওয়া একটি comment-এ reply দিন। দেখুন, tree ভেঙে যায় না এবং repair-এর loop-এ আটকে যায় না।
- ইচ্ছা করে একটি queue ভরে ফেলুন। দেখুন, একটি quota সেটিকে থামায় কি না এবং site-এর অন্য feature-গুলো তখনো কাজ করে কি না।
- Cache বন্ধ করুন। দেখুন, page-গুলো তখনো database থেকে load হয় কি না, আর বাড়তি load-এ database টিকে থাকে কি না।