Hi,

I am working on a web application having more then 5 lakhs users accessing pdf file from server.
Each time a pdf is loaded from server which may consume network bandwidth(our assumtion).
Need suggestions for how can we restrict only 100 or any number of users at a time for retrieving pdf only
or any other suggestion

Hmm well I would probably reccomend displaying the PDF in some kind of PDF viewer in the browser. This way you can initiate bi-directional communication about the state of the PDF's being viewed. Letting the user download the PDF and view it locally won't work obviously because you can't control anything about that process once the user has the file.

Member Avatar for diafol

Restrict "100 at a time" is a bit ambiguous. Does this mean "simultaneous downloads" - however that would be controlled, or do you want to limit to 100 downloads in a specified time period. Or 100 downloads and that's your lot, doc can not be downloaded past that limit.

For downloading, you could set a link to a control page that checks the number of downloads for a specified file (in the url querystring) and then redirects to that file or it can flag a message saying "That's All Folks!"

For that ideally, the link wouldn't be displayed at all once the limit was reached, but we all know that 30 users, say, could be "on a page" with a live link when the limit was reached, so you'd need the control structure to deal with the "just too late" users requesting the file.

Having said that, I doubt whether you're after a 100 downloads for a lifetime. Can you be more specific with regard to your needs?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.