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

  • SEARCH
  • Home
  • 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 8633285
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T09:28:09+00:00 2026-06-12T09:28:09+00:00

Pseucode: function getjson() { $.getJSON(‘link_in_my_server_unique_for_each_user_json’, function(data) { if (data.variable) { do_something(); } });​ }

  • 0

Pseucode:

function getjson() {
   $.getJSON('link_in_my_server_unique_for_each_user_json', function(data) {
     if (data.variable) {
        do_something();
     }
   });​ 
}

setInterval(getjson(), every_second)

Is it expensive to have 1000 users retrieving json file in my server every second and check if that file has some variable?

  • 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-12T09:28:10+00:00Added an answer on June 12, 2026 at 9:28 am

    First, you don’t need to guess. You can measure.

    1. Use the developer tools that are available for your browser (Firebug for Firefox, Developer Tools for Chrome, etc.) and watch the requests and see how long each one takes.
    2. Observe the load on your server. If it is anything other than 0%, you’re never going to see 1000 sessions running simultaneously.
    3. Repeat the steps above, but with a bunch of browsers open. It should be easy to get 20 browser windows open and running.
    4. Remember that, as the server load gets past 50% your performance will become increasingly non-linear. Once your system is blocking/thrashing a lot you can’t expect to gainfully add any more clients.

    Once you have a baseline measurement, you can think about optimization — do you need it and how big a problem do you have on your hands? Some of the usual solutions:

    1. If at all possible, serve a static file or a piece of data from your APC cache.
    2. If your data is cacheable but you have multiple web servers, consider a solution like memcached, MongoDB, or some other centralized very-fast key-based retrieval system.
    3. If the data is dynamically retrieved from a database, consider using persistent database connections.
    4. If the CPU load is high per request, you probably have something expensive in your code path. Try to optimize the code path for that particular request, even if you have to hand-craft a special controller for it and bypass your usual framework.
    5. If the network latency is high per request, use HTTP headers to try and convince the client and server to keep the connection open.

    Finally, if the performance you want seems very out of reach, you’ll need to consider an architectural change. Using WebSockets would likely be a very different code path, but could conceivably result in far better performance. I’d have to know more about what you’re doing with link_in_my_server_unique_for_each_user_json.

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

Sidebar

Related Questions

Suppose I have two key-value data sets--Data Sets A and B, let's call them.
I have data that looks like this. SoldToRetailer OrderDate | Customer | Product |
I have the following table: CREATE TABLE FE_USER ( userid int identity (321,4) CONSTRAINT
I'm wanting to make a CoreData entity called Employees, some Employees could have a
I have a PowerShell script that at the beginning of the program sets the
Short version of question: see title Long version of question: I've used jquery's show()
I need to know about the uniform cost search algorithm. In the uniform cost
In dynamic languages, how is dynamically typed code JIT compiled into machine code? More
I am having some trouble translating a pseudocode for Horner's algorithm into a proper
I need help writing a simple regex for RewriteRule for mod_rewrite in htaccess. So,

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.