I didn’t test that first. It results in a runtime error as incr expects a variable--not a number:
expr { int(10000000 * rand()) }
4888651
incr 1
can’t read “1”: no such variable
Can you try this instead:
[expr { int(10000000 * rand()) }]
This will generate a random number for each HTTP request. It will not increment a past value, so the ID numbers won’t be sequential. If you wanted to store the past value in a global variable, you’d need to use an iRule.