Design Photo Sharing with Followers and Location or Tag Search

Quick Overview

Design a photo-sharing service centered on followers and search by location or tags. Explain the upload lifecycle, social views, spatial and tag indexes, pagination, and visibility checks that keep stale search results from exposing unavailable posts.

Design Photo Sharing with Followers and Location or Tag Search

Company: Okta

Role: Software Engineer

Category: System Design

Difficulty: medium

Interview Round: Onsite

Design an Instagram-like service focused on photo sharing, following other users, and finding photos by location and tags. Do not assume that every feature of an existing social network is required. Define the upload, relationship, and search behavior needed for this scope. ### Constraints & Assumptions - Photo sharing, follower relationships, and location/tag search are required. - Ranking, private accounts, combined filters, and geographic radius behavior must be clarified. - Store large image objects separately from metadata unless you can justify another design. ### Clarifying Questions to Ask - Are posts public, follower-only, or both, and must search enforce the same visibility rules? - Does location mean an exact named place, a geographic region, or a radius around coordinates? - Should several tags use AND or OR semantics, and can location and tags be combined? ### Part 1 — Publish Photos and Follow Users Describe photo upload, processing, metadata publication, follower storage, and the way users view followed accounts' photos. #### What This Part Should Cover - A durable media workflow and clear publication state. - Relationship identity and access checks. - Read/write tradeoffs for followed-user views. ### Part 2 — Search by Location and Tags Design search indexes and a query path, including updates, deletions, and access restrictions. #### What This Part Should Cover - Tag normalization and indexes matching the agreed location semantics. - Candidate retrieval, filtering, ordering, and pagination. - Index lag and visibility checks for stale results. ```hint An image can exist in object storage before its post is ready to appear in search or a follower view. ``` ### What a Strong Answer Covers Connect the media lifecycle, social relationships, and search indexes through stable post identities. Explain how the service avoids exposing incomplete, deleted, or unauthorized posts while keeping read latency and indexing work manageable. ### Follow-up Questions - How would a high-follower account change your feed strategy? - What happens when a photo's tags or visibility change after indexing? - How would you paginate a location search while new photos are added?

Overview: Design a photo-sharing service centered on followers and search by location or tags. Explain the upload lifecycle, social views, spatial and tag indexes, pagination, and visibility checks that keep stale search results from exposing unavailable posts.

Okta logo
Okta
Nov 2, 2026
mediumSoftware EngineerOnsiteSystem Design
0
0

Design an Instagram-like service focused on photo sharing, following other users, and finding photos by location and tags.

Do not assume that every feature of an existing social network is required. Define the upload, relationship, and search behavior needed for this scope.

Constraints & Assumptions

  • Photo sharing, follower relationships, and location/tag search are required.
  • Ranking, private accounts, combined filters, and geographic radius behavior must be clarified.
  • Store large image objects separately from metadata unless you can justify another design.

Clarifying Questions to Ask Guidance

  • Are posts public, follower-only, or both, and must search enforce the same visibility rules?
  • Does location mean an exact named place, a geographic region, or a radius around coordinates?
  • Should several tags use AND or OR semantics, and can location and tags be combined?

Part 1 — Publish Photos and Follow Users

Describe photo upload, processing, metadata publication, follower storage, and the way users view followed accounts' photos.

What This Part Should Cover Guidance

  • A durable media workflow and clear publication state.
  • Relationship identity and access checks.
  • Read/write tradeoffs for followed-user views.

Part 2 — Search by Location and Tags

Design search indexes and a query path, including updates, deletions, and access restrictions.

What This Part Should Cover Guidance

  • Tag normalization and indexes matching the agreed location semantics.
  • Candidate retrieval, filtering, ordering, and pagination.
  • Index lag and visibility checks for stale results.

What a Strong Answer Covers Guidance

Connect the media lifecycle, social relationships, and search indexes through stable post identities. Explain how the service avoids exposing incomplete, deleted, or unauthorized posts while keeping read latency and indexing work manageable.

Follow-up Questions Guidance

  • How would a high-follower account change your feed strategy?
  • What happens when a photo's tags or visibility change after indexing?
  • How would you paginate a location search while new photos are added?