Ajax updates and client/proxy caching; use subsequent requests or not?
Posted 16 August 2006 - 07:54 PM
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?
Posted 17 August 2006 - 07:30 AM
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.
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.
Posted 17 August 2006 - 08:25 PM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users