Tuesday 2 October 2007

Scripted object HTTP request gotcha

If you create a scripted object that makes HTTP requests against an external Web server at fixed intervals and then use shift-drag to make multiple copies of it, watch out! The timer in each replicated object will be exactly the same as in the first - meaning that all your objects will make their HTTP requests at exactly the same time.

Create enough copies and you run the risk of over-loading your Web server.

Much better to build some randomness into the llSetTimer() call, to make sure that the objects make their HTTP requests at different times.

No comments: