Jump to content

Ajax updates and client/proxy caching; use subsequent requests or not?


448191

Recommended Posts

Still working on my ajax enabled application.

I'm struggling with this issue: If I want to optimize client/proxy caching, I have to use seperate files for each component being updated, triggered by a single user action.

What I mean is, what if the components being uppdated have very different lifetimes? If I use a single file, I have to use the lowest compent's lifetime as max-age for the whole update file. What if one or more of these components don't change very often. That would be a shame to have requested over and over again, just because a component with a shorter lifespan was also requested.

Otherwise, I'd have to use subsequent requests to get all updated components.

But how does a server handle many tiny requests? Does it cause latency because a server can only handle so much requests at the same time, or shouldn't I worry about that? Does anyone have any expertise to share on that subject?
Link to comment
Share on other sites

C'mon, I'ts not like I'm asking you to explain the theory of relativety to me.

Ok, let me share some more thoughts, hopefully somebody will step in and fix my ignorance.

1) There probably isn't a standard rule for how many simultanious requests a server can handle, because, I reckon, it depends to much on the server. Dedicated or virtual, connection, hardware, etc... I could probably write a script that tries to overload a server when setting up the application and use statting during normal operations to determin wether a server is near a point where it will overload. It would be easy though, and would very much be like a viral brute force attack, since I would need a lot more than one client to bring down a server. Also, I don't think many hosting companies will like me to overload a shared server.  :P

2) I guess my choice should also depend on how much the lifetime of components vary. If it varies a lot, less requests be made, and the difference in number of requests compared to using a single file will be limited, because clients and proxies can use their copies of smaller update files longer.

This considered, I should probably go with subsequent updating... PLEASE step in if you think you have ANYTHING of relevance to share on this subject.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.