Hi, I am building an app with React Native. While...
# help
s
Hi, I am building an app with React Native. While the user is creating a new account, they can select their username. I have set up an event that when the user has stopped typing there should be a network request to check if the username is busy or not. I use cognito to store my users, I am more of a frontend developer. What would be the best way to create an endpoint that checks if the username is busy without creating a way to DDOS myself?
m
first line of defense is to implement request throttling in the client (if you are using Axios, use something like
axios-request-throttle
). After that best to implement some WAF rules in front of your API via AWS WAF or Cloudflare
f
Yup, agreed with @Michael Clifford.
@Saman - I won’t worry about it too much early on, unless you are expecting a ton of traffic up front. It’s something that can always be configured later.