Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9283691
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T18:41:43+00:00 2026-06-18T18:41:43+00:00

As I am implementing a simple load balancing service, I think Big-O is a

  • 0

As I am implementing a simple load balancing service, I think Big-O is a key factor for it’s future performance and scalability. But I could find no reference regarding the big-O of both algorithms (WRR & RR).

I made a try to calculate both of them.
(WARING my calculations might be wrong but I’ll edit the post as soon as I get a rightful answer)


n-> number of serving nodes (and weights)
z-> number of waiting/incompleted tasks
For WRR: O(nnz)
For RR: O(z^2)

For WRR: O(1)
For RR: O(1)

So the real question is, if my calculations are right but most important which algorithm perform the fastest in a case of continuous load balanced (to each running node) thousand submitted tasks per second.

Some helpful references:

  • A Very nice RR implementation
  • A stackoverflow question regarding WRR

Cheers!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T18:41:44+00:00Added an answer on June 18, 2026 at 6:41 pm

    So what is it exactly you need to measure? As big O is for algorithm performance, it seems the reasonable thing to measure is the time complexity for each sheduling decision, i.e. how many operations are required to match one task to one node.

    Round robin

    Both the list of ready nodes and the list of waiting tasks can be implemented as queues, and operations on queues can be implemented constant amortized time. So except for the time required when you need to allocate new memory for your queue, you operate in O(1).

    Weighted round robin

    If your weights are fixed and commensurable, then you can achieve the same complexity here as well: simply place each node into the cyclic queue several times, proportional to its weight. One can formulate an algorithm to space them evenly within the queue. For most practical applications, some moderate quantization will lead to weights which can be represented as (i.e. scaled to) reasonably small integers.

    Other considerations

    Do you get any feedback at all about whether your nodes are busy or idle? If you do, then RR should work well enough, since you didn’t state any fairness requirements. If you don’t have idle feedback, then WRR might make sense. But in that case, the number z in your formulas appears somewhat confusing, since how can tasks be waiting if you don’t know whether nodes are ready to accept them? If they are waiting because the balancer can’t handle them fast enough, then this still shouldn’t matter for your considerations, as you can imagine the queue of tasks as before the scheduling algo: the length of that queue has no impact on what happens in the scheduler. Again assuming all tasks are the same to you, without priorities, QoS guarantees or similar meta information.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm implementing a simple load balancer - it's an http listener which parses incoming
I am implementing simple thread that passes messages to main UI thread to make
Implementing a simple Login screen using JSF and Spring and Hibernate. I have written
I am implementing a simple application for expenses reporting.The application will use GAE. In
I'm implementing a simple chat in .NET using Rx on the basis of this
I'm implementing a simple Graph library for my uni project and since this is
I'm implementing a simple update mechanism for an application I'm writing the last part
I am implementing a simple version of a linux shell in c. I have
I am implementing a simple iOS solitaire game that allows the user to drag
I meet are having difficulty in implementing a simple event OnCheckedChanged for control checkBox

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.