Communicating with the servers in Webpage System Design
6.1. User Authentication
Description: Allows users to securely log in to access the system.
Endpoint: `/auth/login`
Method: POST
Request:
POST /auth/login
{
“username”: “user123”,
“password”: “securepassword123”
}
Response:
{
“accessToken”: “eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9…”,
“expiresIn”: 3600
}
6.2. Retrieve User Profile
Description: Retrieves detailed information about a specific user.
Endpoint: `/users/{userID}`
Method: GET
Request:
GET /users/123456
Response:
{
“userID”: “123456”,
“name”: “Salik Alim”,
“photoURL”: “https://example.com/profile.jpg”,
“points”: 500,
“badge”: “Gold”
}
6.3. Search Users
Description: Allows searching for users based on specified criteria.
Endpoint: `/users/search`
Method: GET
Request:
GET /users/search?query=Salik&filters={“badge”:”gold”}&page=1&limit=10
Response:
{
“results”: [
{
“userID”: “123456”,
“name”: “Salik Alim”,
“photoURL”: “https://example.com/profile.jpg”,
“points”: 500,
“badge”: “Gold”
// …more user data
}
],
“totalResults”: 25
}“`
6.4. Update User Profile
Description: Allows users to update their profile information.
Endpoint: `/users/{userID}`
Method: PUT
Request
PUT /users/123456
{
“name”: “Khabib Nurmagomedov”,
“photoURL”: “https://example.com/newprofile.jpg”,
“points”: 600,
“badge”: “Diamond”
}
6.5. Request for Next Batch
Description: Requests for next batch of data to be displayed on the screen.
Endpoint: `/users/nextBatch`
Method: GET
Request
GET /users/nextBatch?lastUserID=100&pageSize=50
Response
{
“users”: [
{
“userID”: 101
“name”: “User101”,
“photoURL”: “https://example.com/user101.jpg”,
“points”: 250,
“badge”: “Silver”
},
{
“userID”: 102,
“name”: “User102”,
“photoURL”: “https://example.com/user102.jpg”,
“points”: 180,
“badge”: “Gold”
},// … more user data
],“totalUsers”: 1000
}
Design a webpage that can show the status of 10M+ users including: name, photo, badge and points | System Design
We’ve got this huge community—over 10 million strong—and you want to build a webpage where everyone’s details, like their names, photos, those cool badges they’ve earned, and their points, can all be seen. That’s a massive load of information to handle. Achieving this goal necessitates an efficient and scalable system architecture capable of handling immense data volumes without compromising on performance or user experience.
Important Topics for the Webpage System Design
- Requirements of the Webpage System Design
- Capacity Estimation of the Webpage System Design
- High Level Design of the Webpage System Design
- Database Design of the Webpage System Design
- How to show the status of 10 million users
- Communicating with the servers in Webpage System Design
- Database Architecture of the Webpage System Design
- Low Level Design of the Webpage System Design
- Work Flow of Webpage System Design
- How to make the system Scalable?