Hi Praveen G
This is a common VAPT implementation where you need to add Rate limitation so that hacker cant abuse your calls. There are two methods as you already asked.
Logics inside Mendix :
You can use either Emixa commons module [link] or my own Session security module [Session Security] to implement Rate limitation which lives inside the mendix stuio pro.
At Infra level:
See again you need to configure this in nginx via reverse proxy which will be IP based or Host based and This is also possible.
But I suggest you can go with implementing this logic via mendix.
I hope this helps.