Design Api Rate Limiting Algorithm In Programming