I have a web application where users can login and read their messages. I use to use the ID primary key in database to access and deal with users message through the site such as (viewmessage/3) but I quickly realised I did not want to do that as it gave information to all users as to how many potential messages are stored in database. Same idea with the users, to view a users profile I use to use their ID but that gives out how many users on the site... So what I did is added a new column in each table called UrlKey, this key is a varchar(16) which is composed of 16 unique randomly generated numbers which I use to map to ID on the server side.
My question now, is 16 too much or common practice (16^10), should I use just ints or a mix of int and ascii characters, any guidelines recommendations in terms of speed, security etc...? Thanks alot