I read a few lines about the Burst Threshold and rates.. but actually I can’t understand how to do it…

I want the user to surf the internet with 1mb speed, and if he still use the full speed for 20seconds the speed reduce to 512k.
Thats it>>> (or some thing close!)
Rate limit: 512k
Burst rate :1M
burst thresold: = 384k
burst time = 20s
min rate: 64k (minimum guaranted to client)
priority: 5