Additional functionalities like the ability to bookmark an ad may be considered too, but may be implemented later. Let's keep it in mind while designing the system anyway.
User authentication is also an obvious feature.
- User: Identifier, login, metadata (name, contact and address if revelant for the system)
Identifier used for sharding (better than login which would imply re-balacing in case of update).
Index should be added on login field at least (retrieve a user) and additional fields based on usage.
- Ad: Identifier, Author (user ID), metadata (title, content, tags, media).
Actual media contents being stored somewhere else like a CDN for fast access (but may be stored on an object storage waiting for kind of validation before being pushed to the CDN).
User ID used as sharding key in order to speed up lookup regarding ads for a specific user.
Index on author may be useful for queries likes displaying every ads for a user.
- Search: Identifier, Author (user ID), search criterias, notification preferences (email and/or push for instance, frequency)
Each of them except the last one will have their dedicated datastores in order to isolate domains from each others.
It's obvious but system must be elastic enough to be able to setup auto scaling, and using load balancers will helps spreading the traffic among available systems instances.Also, an API gateway will be added as unified entry point for the whole system
Ad service:
High availability over strong consistency: NoSQL database like mongoDB would better scale than an SQL DB.
Peak of traffic:
Separation of Concern: Thanks to the fact that the three system are independant from each other, they are able to function even if others are down. It might imply eventual consistency in some cases regarding data display to the user.