the trailboss abuses his CodeRanch power for his other stuff (power corrupts. absolute power corrupts absolutely is kinda neat!)
permaculture light bulbs permaculture electric heat permaculture cast iron permaculture wood burning stove permaculture solar food dehydrators
The moose likes Meaningless Drivel and the fly likes How come login be so fast? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Other » Meaningless Drivel
Bookmark "How come login be so fast?" Watch "How come login be so fast?" New topic
Author

How come login be so fast?

Pavan Kumar Dittakavi
Ranch Hand

Joined: Feb 12, 2011
Posts: 104

Hi All,

Why is it that login to say Facebook/code ranch/gmail /.. everything is so fast?. I mean it practically needs to check if the user existis in the first place and if it exists, then it needs to identify if the password is accurate. How come all this happens in just moments?

Please shed some light .

Thanks,
Pavan.
Martin Vajsar
Sheriff

Joined: Aug 22, 2010
Posts: 3606
    
  60

Of course it is fast - Google&co already knows everything about you

Seriously, though, your login name is stored somewhere in a database and indexed. Due to the index, getting a row corresponding to your name is very fast, it involves just a few IO operations. Speed of an index access it is practically independent of the size of the table. Then your password hash is read (one or two IOs again), your password is salted, hashed and compared to a hash from a database. I'd say that the cryptographic hashing is the most expensive operation there, but given today's CPU speeds, it appears instantaneous.
 
permaculture playing cards
 
subject: How come login be so fast?
 
Similar Threads
Design doubt
confusion regarding authentication
How can i use Session in login page
Contradiction in preparing itinerary
Object's method