Designing Services to Stay Reliable When Work Queues Back Up

Before running more automation, make sure you accept only as much work as you can handle. This article explains how to manage overload based on wait times and each customer's share of processing capacity.
← All posts
온
온틀 리서치
2026년 11월 25일 Updated 2026.12.01 46 min read views 7

A customer uploads meeting notes. The screen says, “Received.” A moment later, another customer uploads hundreds of meeting records from the previous quarter at once. The first customer is waiting for a summary to use in their next meeting, but the service keeps showing “Processing.”

The servers haven't gone down. The page that accepts requests works fine. But if customers can't get their results when they need them, the service has failed to do its job.

When building automation, we usually focus on processing one item well. We connect the steps: read a file, organize its contents, and save the result. Trouble starts when more work enters that carefully built workflow than it can handle. Processing one item correctly and finishing many items on time are different problems.

This article looks at what to accept, what to keep waiting, and when to defer new requests as work piles up. The numbers are hypothetical examples used to explain the design. The business scenarios involving ONTLE are also fictional, not actual customer cases or descriptions of its internal implementation.

Accepting a request doesn't mean the job is done

It's hard to keep a web request open until a long-running task finishes. Services often accept the request first and do the actual processing later. Separating the connection the user is waiting on from the work itself is called asynchronous processing.

The list that holds work to be processed is a work queue. We'll call the programs that take work from the queue and execute it workers. This separates the place that accepts requests from the place that does the work.

With this structure, a brief surge in requests doesn't have to be processed immediately. Tasks can run in turn as capacity becomes available. But a queue doesn't increase processing capacity on its own. If there's a fixed amount of work you can do today, a longer list means someone will finish later.

Suppose one worker always takes 30 seconds to process one document. With four workers that don't interfere with one another, ideal throughput is 8 documents per minute. If 12 documents keep arriving every minute, the backlog grows by 4 every minute.

Plenty of queue storage won't solve this problem. In fact, because requests continue to be accepted successfully, it can take longer to notice anything is wrong. The system is taking requests just fine, while its promises to customers become harder and harder to keep.

The question needs to change when you design the acceptance response. Don't just ask, “Did we store it?” Ask, “If we accept this work, can we finish it while the result is still useful?”

Look at the work remaining, not just the number of tasks

Knowing that 100 tasks are waiting tells you little on its own. Summarizing 100 short sentences takes a different amount of time from analyzing 100 long documents.

Start by grouping similar tasks. Don't treat them as the same kind of work just because they contain the same number of files. Identify factors that affect processing time, such as document length, attachments, and the number of external service calls. A simple split between short and long tasks may be enough at first.

Then observe roughly how much processing time each type consumes. You don't need a precise prediction model from day one. Just being able to distinguish a backlog of short tasks from a few long tasks occupying the workers can change your operational decisions.

Suppose 90 tasks, each requiring 20 seconds, are waiting for three workers. The total processing time required is 1,800 seconds. With no other constraints and an even distribution of work, clearing the queue would take about 10 minutes.

That figure doesn't guarantee when any one new task will finish. Tasks already running have time remaining, and individual processing times vary. Still, it gives a clearer sense of the backlog than “90 tasks waiting.”

For users, a range is more appropriate than a firm completion time. If you don't have enough observations, showing the current queue status is more honest than guessing that a task will finish in a few minutes. Once you start providing estimates, record the difference between predicted and actual completion times too.

If predictions keep missing the mark, the answer isn't better wording. Revisit how you classify tasks and what you assume about their processing times.

Find what's limiting throughput first

When wait times grow, adding workers is tempting. Sometimes it works. But there's no guarantee that worker count determines overall throughput.

Reading documents might be fast while responses from an external analysis service are slow. Tasks might block one another while saving results. Multiple workers reading from a storage device with limited capacity could even make each task take longer.

The point that limits the speed of the whole workflow is called a bottleneck. Recording only total task duration isn't enough to find it. At a minimum, distinguish time spent in the queue, preparing input, waiting for external processing, and saving results.

If an external service limits how many requests it accepts, adding workers won't raise that limit. Sending more requests concurrently may only produce more rejections. In that case, you need a separate limit on the volume of external calls.

Conversely, if time spent waiting on external services stays the same while the wait before reaching a worker grows, you can investigate whether there are too few execution slots. The right response depends on which stage is taking longer.

Increase worker counts in small steps when experimenting. Compare both completed task counts and task durations before and after the change. If doubling the workers barely changes throughput, find the other constraint before spending more.

Retries after failed external calls also consume capacity. If failed requests are repeated immediately, they leave less room for new work. Set bounds on retry intervals and counts, and monitor the total load, including those attempts.

Control admission before work enters the queue

Accepting everything and processing it eventually is a simple policy. But when users are waiting on results to do their work, a success that arrives too late may be no better than a failure.

A queue therefore needs admission criteria. The most intuitive criterion is, “Can we process the current backlog within this much time?” Start with an acceptable wait time, rather than the maximum number of tasks you can store, and limit incoming work accordingly.

For example, if the estimated wait at submission already exceeds the feature's acceptable range, don't immediately register the new request for processing. You can defer acceptance or, with the user's agreement, schedule it for a quieter period.

Reducing incoming work to match the capacity available downstream is called backpressure. The term may be unfamiliar, but the behavior is concrete: when the back end can't finish the work, slow down acceptance at the front.

The meaning of a rejection matters here. Distinguish between failing to store a file, storing it without scheduling execution, and successfully scheduling it. Users need to know which happened so they can decide what to do next.

If all you say is “Too many requests,” customers are likely to press Submit again. Instead, state what is known: “Your file has been saved. Analysis can't start right now.” If they need to resubmit, explain when they can do so or what other options are available.

Admission limits can't live only in the user interface. Other programs may call the same feature. Make the final decision where tasks are actually registered so every entry point follows the same rules.

You also need to account for simultaneous requests. If every request reads “one slot remaining” and then registers itself, the limit breaks down. Checking availability and claiming a slot must happen together, without another request intervening.

Keep one customer's bulk requests from blocking everyone else

Limiting total admissions still leaves room for unfairness. If one customer takes every available slot first, a later customer can't submit even one small request.

Processing requests in arrival order is easy to explain. But in a service shared by multiple customers, that order isn't always appropriate. A customer organizing a large archive may have different needs from one checking work that's happening right now.

The first control is a per-customer admission limit. Restrict the amount of work each customer can have waiting. Where possible, account for both task count and task size. Putting all their material into a single file shouldn't let a customer bypass the limit.

The second control is a per-customer execution limit. Even if a customer has many tasks waiting, those tasks shouldn't occupy every execution slot. Admission limits control how much of the queue a customer occupies; execution limits control how much current processing capacity they use.

You don't have to divide execution slots into fixed allocations at all times. When other customers have no work, spare capacity can be used. But you need to decide how to return that capacity when another customer arrives. If long-running tasks can't be stopped immediately, a practical approach is to assign slots as those tasks finish.

Giving short tasks precedence is also worth considering. It can help many users get results quickly. But if short requests keep arriving, long tasks can be pushed back indefinitely. You also need a rule that gives tasks a chance to run after they've waited a long time.

I wouldn't start with a complicated scoring formula. I'd choose rules an operator can explain, such as “limit concurrent tasks per customer” and “give tasks a chance to run once they exceed the maximum wait time.” That makes it easier to trace the decisions made when something goes wrong.

Don't change the order just because a request says “urgent”

Adding priority may seem like a solution, but every request can become urgent. Give customers an unrestricted urgent button, and ordinary submission becomes the losing choice.

It's better to tie priority to the actual time constraints of the work than to the feature's name. A scheduled report and a review requested just before a meeting have different acceptable wait times. Even document analysis can be classified by when the result will be used.

It's risky to determine the entire order by taking user-entered deadlines at face value. Requests asking for immediate processing would always go first. You need to define valid time ranges for each type of work or limit how much urgent processing a customer can use.

Another option is to reserve some slots for urgent work. They may look idle during normal operation, making the expense feel wasteful. But once long tasks occupy every slot, even a short urgent request must wait. If a feature needs to start quickly, that spare capacity belongs in its operating cost.

At the same time, urgent work must not defer ordinary work indefinitely. Setting a minimum throughput allocation for each can reduce the risk of either coming to a complete stop. Priority is one condition for dividing limited capacity, not a universal rule that can run the whole service.

When most requests become urgent, adding more categories isn't the answer. You need to redefine the promises you can actually keep.

Applying this to a delivery deadline change request

Suppose a customer asks to change a delivery deadline in an AI project manager service like ONTLE. The person responsible needs to assess the impact before an afternoon meeting. The service reads the relevant schedules and tasks, creates a proposed adjustment, and makes it available for review.

Meanwhile, the same customer is uploading a large volume of past project material. If proposal generation and historical material processing follow the same queue order, the review needed now may end up waiting behind old records.

First, distinguish the two kinds of work. Organizing historical material can proceed a little later. Reviewing a deadline change has a time by which someone needs to see the result. Store that time and the relevant project when accepting the request.

Setting the completion deadline to the meeting's start time isn't enough. The person responsible also needs time to read and revise the proposal. For a 3 p.m. meeting, receiving it at 2:50 p.m. may leave too little time to review. Determine the time available to the service after subtracting the time the person needs to prepare.

Next, check the current backlog. If there is enough capacity, schedule execution. If the work is already likely to be late, don't hide that behind “Request accepted.” Show the situation so the person can choose whether to wait for automated analysis or start reviewing it themselves.

A reduced result may help here. For example, instead of analyzing the impact across all related projects, the service could first provide a list of tasks directly connected to the proposed change. But it must not present that as a complete schedule adjustment proposal. Show which parts of the review are missing alongside the result.

A reduced feature is useful only if it actually consumes fewer resources. Running the full analysis internally and displaying only part of it won't reduce congestion. The data read and the computation performed must also shrink to match the reduced scope.

The important decision in this design goes beyond which work to make faster. It treats helping the person continue their work while automated analysis is delayed as part of the product's responsibility.

Clear out work that loses its value while waiting

While that deadline change request waits in the queue, the customer might cancel the change. The person responsible might adjust the schedule manually. Executing the task anyway would consume capacity to produce a result that no longer helps.

A worker therefore shouldn't start expensive processing simply because it has picked up a task. First, it should check whether the request is still valid and whether enough time remains.

It helps to distinguish two deadlines. One is the start deadline: after this point, the chance of finishing in time makes the task no longer worth starting. The other is the completion deadline, when the result is needed. The gap between them must leave enough room for the actual processing.

If processing times vary, allowing only the average duration may not be enough. Look at slower cases too, and choose a margin that reflects the risk the workflow can tolerate. If a feature absolutely must meet a specific time, don't rely solely on estimates; secure dedicated processing capacity as well.

Check whether the source material has changed, too. If the schedule at submission differs from the current schedule, a proposal based on old data may cause confusion. Record which version of the data the task is meant to use, and compare it with the current state before execution.

Finding a difference doesn't always mean switching to the latest data is right. A request to compare the state before and after a change needs the earlier state. Decide whether to use current data or close the request and require a new review based on the purpose of the feature.

For work that's already running, cancellation may not free resources immediately. If external processing can't be stopped, at least prevent its result from being applied to the current work when it returns. That's why a “Canceled” status on screen and an actual halt in processing shouldn't mean the same thing.

Tell people what they can do while they wait

Even with a well-managed queue, a screen that says only “Processing” leaves users frustrated. They can't tell whether the work has started, is stuck, or calls for another approach.

Status messages don't need to expose every internal program step. They need to show the points where the user's options change. Before work starts, can they edit the input? During execution, can they request cancellation? If a result is ready to review, where can they find it?

Be careful about showing queue positions. With per-customer allocations or urgent processing, earlier submissions aren't guaranteed to finish first. A position that falls and then rises again is also hard to explain. If the number doesn't match the actual scheduling rules, it's better not to show it.

The same applies to progress percentages. Showing 50% because five of ten stages are complete creates false expectations if the remaining stages take longer. If you can't calculate the amount of work remaining, describe confirmed progress instead: “Source material checked. Analyzing the impact.”

In the deadline change scenario, the person responsible should be able to switch to manual review while waiting for the automated review. Once that happens, decide where a late automated result belongs. Keeping it as a separate reference may be more appropriate than automatically incorporating it into an already finalized schedule.

The customer's clock keeps running after acceptance. Design the status screen as a place where users decide whether to keep waiting, rather than merely a signal that the system is alive.

Monitor time and distributions in operations dashboards

An operations dashboard that shows only total queue length isn't enough. A larger-than-normal queue may be recovering if it's shrinking quickly. Conversely, even a short queue may reveal a scheduling problem if one customer's tasks are always left behind.

Start with the age of the longest-waiting task. Add wait times by work type and by customer. This keeps a short overall average from hiding long waits for some customers.

View incoming and completed work side by side, too. Even if few requests are arriving now, recovery will be slow without spare capacity to clear the existing backlog. You need to judge when the backlog can be cleared while normal admissions continue.

Track how often admission is limited as well. Limits may keep running tasks healthy while customers are unable to use the feature. Internal processing success and whether customers could start the work they wanted are separate questions.

Where possible, connect alerts to actions. If execution slots are scarce, consider adding capacity. If a particular external call is delayed, reduce request volume to that stage. If delays affect only one customer, examine scheduling rules and task size estimates.

Define the conditions for reopening admissions in advance. Resuming right at the threshold that triggered the limit can cause small fluctuations to repeatedly open and close admissions. It's more stable to wait until enough capacity is available, then accept a small amount of work at first to check the recovery.

Test by deliberately creating a backlog

A few successful requests under normal conditions won't validate this design. Deliberately create a backlog and check whether the service behaves as promised while it is under load.

The first experiment is a short burst. Submit requests all at once, then stop the inflow. Check whether admissions stay within the allowed limit and whether the backlog shrinks as expected. Don't stop at verifying that stored requests haven't disappeared.

Next, keep submitting slightly more work than the service can handle. Surviving a brief spike and controlling sustained excess demand are different things. Check when admission limits kick in and what status users see.

You also need an experiment with separate customers. Have one send many long tasks while another sends occasional short requests. Check whether the latter start within the defined wait limit. At the same time, make sure long tasks continue to get opportunities to run.

Slowing only the external processing stage lets you reproduce a situation where adding workers won't solve the problem. Check that retries don't amplify the load and that operational metrics identify the stage causing the delay.

Finally, queue a deadline change request, then cancel it or modify the related schedule. Verify that the validity check before execution works and that late results don't alter work that's already finished. Tests for congestion need to cover not only speed, but also the conditions under which results are used.

After these tests, document the operating rules in language the people responsible can use. Write down when to reduce admissions, what to check before reopening them, and which choices to offer customers. Someone responding to an alert at night shouldn't have to guess what the designer intended.

You can add one question when launching a new automation: “If we received ten times as much of this work, whose work would be delayed first?” Being able to answer that concretely means you've prepared for operations beyond the feature's success screen.

FAQ

Can an administrator manually move an urgent task to the front?

You can allow exceptions. But you need to record who changed the order and why, and make it possible to identify the affected tasks. If repeated administrator intervention becomes normal practice, the automated scheduling rules become hard to trust. It's better to collect the types of work that frequently need manual changes and consider incorporating them into a formal policy.

What can we do before a customer submits files for a bulk job?

You can separate uploading from requesting execution and provide a screen for checking the expected processing scope before execution begins. This helps customers reduce unnecessary work by selecting the time periods or document types they need. However, if you must read the files to determine the scale, that preliminary check has a cost too. Set separate limits on file size and throughput for these checks.

What if scheduled tasks all arrive at the same time every day?

Tasks that don't require an exact start time can be spread across an allowed time window. For example, reports that only need to finish before the workday begins don't all have to start at midnight. But check when the input data becomes final and when other tasks need the results. Simply spreading out start times may cause tasks to read data that isn't ready yet.

How should we display charges for work that couldn't run because of admission limits?

First, decide which event triggers billing: acceptance, the start of execution, or delivery of the result. If you temporarily reserve part of a usage allowance, distinguish that reservation from an actual charge and define when it is released if execution cannot proceed. Managing task status and payment status as a single value makes cancellations and partial processing difficult to explain. It's clearer to link them so customers can check the basis for each task's charge while managing their states separately.