Google Interview Question
InternsCountry: United States
Requirements:
1. millions of users
2. each user can login from multiple devices (assume 1 at a time)
3. user can send, draft, delete, trash, spam, move to another folder
4. Add contact, add calendar entry, send invite... (optional)
5. 2 level authentication for new device
6. Long term testing (many days), short term (hours)
Scale:
Need many users (100s of millions)
Distributed tests with 100s of agents/slaves
Each slave runs multi-threaded agents with 1000s of email clients
Do we need geographical diversity?
High Level Test Design:
Distributed testing recommended
Master tester keeps track of all slaves completed test, failed test etc.
Asynchronous. Master polls for results or receives some notification when test is done.
Master times out at some point with data of tests passed, failed, incomplete
Master also allocates username lists to slaves (common, unique etc).
Mechanisms to enforce some sequencing when slaves access same account
Slave tester provides list of usernames
Slave tester uses unique identifies to store info in drafts folder.
Slaves logs all tests and uploads results/logs to master.
1. Write multi threaded code which simulates emails from multiple hosts.
- Abhi October 17, 20152. Simulate other factors like new users joining/ adminstrative tasks/emails/spams.
3. Since he talks about distribution, test node failures.
4. Test replication of storage.
5. Test storage of attachments.
6. Test across data centres.
7. Test with timezones. Various timezones have various loads at different times.
8. Test dispatch of advertisements.