Session replay technology refers to the process of recording and playing back the user sessions on a website or application, almost like a screen recording. This technology is vital for Product and user experience teams to analyze user behavior throughout their product and uncover potential problems. Building it, however, presents a number of difficulties, particularly from the point of view of data and scale. Some of these challenges include: 1. Data Capture: Capturing all Page (DOM) changes, mouse movements and user activity in real time with almost no scope for buffering at client side. We discuss the impact of websockets vs http data transfer and queueing to protect against any data loss. 2. Data privacy: Recording and storing user sessions can raise privacy concerns. Session replay technology must be designed in a way that protects user privacy and complies with data protection laws. This involves challenges both at the source as well as at rest and requires geographical distribution of data. 3. Data Storage: Session replay technology generates large amounts of data as it records every user interaction on a website or application. Storing this data can be a challenge, particularly when dealing with high traffic websites or applications. We use ScyllaDb for our storage and experimented with different compaction strategies for our use case. 4. User Experience: Lastly, watching replays of sessions should be simple and speedy for optimum user experience. It implies that every recording should be playable again in near real-time and impacts our data sharding. In this talk, we'll discuss how our team at Browsee approached these problems and what we discovered along the way.