GET(short-url)-> long-url
POST(long-url)-> short-url
Two Major APIs
Once we will get a long url , we will generate a alphanumeric string with at most 7 character and then check if we have this mapping in a bloom filter , it will tell with 100% accuracy that this short identifier is not present. If it says that its present then we can check direct scylladb. Once our system confirms that this is not present , we will take a lock on this short identifier and if we get the lock then we can register it, then release the lock. If lock not found ,then we will create a key again and repeat this process.
first we will check if this short identfier is present in bloom filter or not, if not present we will return 404, else we will check it.
We will have 3 layers where we will store data