Audio Streaming Application Performance:
A Comparative Study of Spotify and YouTube Music
Lachlan Moore
Supervisor: Carey Williamson
[Link]@[Link]
Abstract Both services are compared in the context of our campus of
Music streaming is an increasingly popular Internet service. over 33,000 students, faculty, and staff.
The music streaming market is dominated by two main com- Our study involves the collection and analysis of data at
panies: Spotify, and YouTube Music. In this study, we charac- both a micro and macroscale. In the microscale, data is col-
terise Spotify and YouTube Music’s network performance at lected at the packet level from both music streaming services,
both a micro and macroscale. Our microscale observations Spotify and YouTube Music, in a controlled environment. By
capture specific packet level data, while the macroscale data analysing the micro data, we then narrow down the overall
is taken from our campus network traffic. The results of network data stream, at the macroscale, to just that of Spotify.
this study show heavy traffic usage of both music streaming This in turn allows us to provide a full campus overview of
services, which show diurnal patterns and heavy tailed be- Spotify’s network performance, as well as comparison of the
haviour. YouTube Music and Spotify differ in their network two at a packet level.
infrastructures, protocol, usage, and popularity. This study seeks to answer the following questions:
• How much campus network traffic is generated by
1 Introduction these two music streaming services?
Every year there is an increasingly large market share for • How are these two services similar or different in their
music streaming services. With the ongoing COVID-19 pan- architecture, traffic patterns, and protocol usage?
demic, the demand for services to be online has only further • Are there differences in the network-level or user-level
increased this popularity. These streaming services account performance for these two applications?
for 83% of all revenue generated by the music industry [5]. The rest of this paper is organised into five additional
Due to the massive market share for music streaming, there sections. Section 2 provides background information and
is also an increasing number of companies providing this prior related work on music streaming apps. Section 3 de-
service, including Spotify and YouTube Music. scribes the passive and active methodologies for collection
Spotify is the world’s largest and most popular music and analysis of data. Section 4 presents the microscale mea-
streaming software with 365 million active users [9]. Spotify surement results, while Section 5 presents the macroscale
offers free access to 70 million unique tracks and 2.9 million measurement results. Finally, Section 6 concludes the paper.
podcasts with advertisements, while some additional features
such as commercial-free listening are offered via subscription. 2 Previous Work
They also offer features such as public/collaborative playlists, There are previous studies on video based media streaming,
music stories, and friend activity lists. According to a paper although few study audio based media streaming. While
in 2018, [3] an average listener spends about 25 plus hours Spotify has been extensively researched, most contemporary
of music listening per month. research fails to compare it with the fastest growing music
YouTube Music, a relatively new service, is the fastest streaming site, YouTube Music. Because of this, a comparison
growing music streaming service [1]. YouTube Music is the of the two services, from a network standpoint is novel.
successor of Google Play Music and has 60 million tracks. Sackl et al. [10] investigated the impact of temporal im-
YouTube Music offers similar services to Spotify, including pairments between video and audio streaming services. By
free accounts with advertisements, with the main differences conducting a subjective user study they found that music
being access to watching music videos and listening to radio streaming users are less tolerant to initial delays and stalling.
stations. Schwind et al. [11] conducted an QoE analysis (active
The main focus of this study is the comparison of Spotify measurement) on Spotify’s mobile application in order to
and YouTube Music’s usage at a network level. We specifi- find network related properties. They found that Spotify not
cally look deeper into Spotifys’ overall network performance. only buffers an entire song, but also prefetches subsequent
songs in a playlist to avoid possible network delays.
CPSC 503.08, December 2021, Calgary, AB, Canada Basher et al. [2] compares peer-to-peer (P2P) and Web
© 2021 Association for Computing Machinery. traffic from a large scale network to discuss the implication
of increased P2P traffic. They suggest that new models are
CPSC 503.08, December 2021, Calgary, AB, Canada Lachlan Moore and Supervisor: Carey Williamson
necessary for Internet traffic and provide flow-level distribu- Each test was run from the campus wireless network at
tional models for Web and P2P traffic. various times throughout the afternoon, between 11:00 -
Laterman et al. [7] characterised two video streaming ser- 15:30. The campus AirUC-guest network, eduroam, as well
vices, Netflix and Twitch, at the campus level. By studying as the edu secure networks were all used in testing. Locations
traffic on a campus edge router they were able to see the of the tests varied throughout campus and were conducted in
similar traffic characteristics of the two video services and locations such as MacEwan Hall, Math Science Laboratories,
how their network performance might be improved. Craigie Hall, and Science B. All active measurements were
Kreitz et al. [6] gives an overview of the protocol and done on the same single laptop device, an HP Spectre x360 13-
peer-to-peer (P2P) architecture used in Spotify and its per- aw2020ca (Quad-Core 4.7 GHz CPU, 16 GB RAM), running a
formance. They found that 8.8% of music data came from Windows 10 operating system.
Spotify’s servers, another 35.8% of data coming from the P2P Table 1 describes the location, time, date and network
network, and the remaining percentage from cached data. used for each test. Results from each location and time were
Because Spotify no longer uses a P2P architecture [4], our consistent among tests, but with more packets being lost at
study deviates from Kreitz’s study. busier locations as well as at busier times of the day.
Table 1. Metadata for Active Measurement Experiments
3 Methodology
This section describes the active and passive measurement Streaming Service Location Time Date Network
YouTube Music Math Science Laboratories 15:03 2021-09-24 Edu secure
techniques used to collect and analyse music streaming ser- MacEwan Hall 11:31 2021-10-05 Eduroam
vices. In this study, we collected and analysed network traffic Science B 13:15 2021-10-13 AirUC
Craigie Hall 14:15 2021-10-15 Edu secure
from the University of Calgary campus network. The col- Spotify Math Science Laboratories 15:24 2021-09-24 Edu secure
lected data was analysed in controlled environments for the MacEwan Hall 11:40 2021-10-05 Eduroam
microscale, while the macroscale was from overall campus Science B 13:22 2021-10-13 AirUC
Craigie Hall 14:24 2021-10-15 Edu secure
traffic. At the microscale, we used Wireshark to measure and
analyse the packet data. Utilizing this gathered packet data,
we were able to greatly narrow down the campus network 3.2 Passive Measurement
traffic to specific servers to analyse.
Passive measurement involves observing the overall traffic
flow from one or more network vantage points, without in-
3.1 Active Measurement jecting any additional traffic. We passively collected network
Active measurement involves the injection of network traffic data from a campus edge router connected directly to the
for the purpose of measurement, and is used to understand Internet. Our campus network is used by 33,000 students,
performance. Small-scale active measurement was used to re- faculty, and staff.
veal important information about how the streaming service To capture network traffic, we used a capture card on
operates over the Internet. This process identifies specific the campus’s edge router. Our data collection mechanism
packet level information such as domain names, IP addresses, records connection-level information and not packet-level
protocols, port numbers, and TCP/UDP connections. payloads. The captured traffic is stored as Bro connection
To capture our packet data, we used Wireshark. By cap- logs which contain timestamps, IP addresses and ports of
turing packet level information, we are able to validate the the source and destination, connection duration, connection
IP addresses. This in turn allows us to confirm that these IP state, as well as the number of packets and bytes sent and
addresses are consistent between each of our tests with Spo- received.
tify and YouTube Music. Our methodology was exclusively To analyse the captured data, we used various Bash and
tested in Spotify and YouTube Music’s Google Chrome Web Python scripts. These pulled specific data from the Bro logs
applications. for analysis and observation.
Prior to running our tests, many other extraneous applica-
tions were disabled or their Internet access was terminated. 4 Microscale Measurement Results
Each experiment was performed in various locations on In this section, we present our comparison between Spotify
campus. To maintain consistency between experiments, Web and YouTube Music at the packet level.
applications were used and loaded from a fresh browser ses-
sion, and the same song was played during each test. From 4.1 Service Infrastructure
Spotify or YouTube Music’s main page, the song 4:00 A.M. The first result that our tests with Wireshark were able to
[8] by Taeko Onuki was searched and played for its full du- provide was the server layout of both Spotify and YouTube
ration. These tests each spanned around around six minutes Music. Each of the services is using various addresses, with
and captured data for the entirety of that duration. Spotify having around 15 servers and YouTube Music having
Audio Streaming Application Performance:
A Comparative Study of Spotify and YouTube Music CPSC 503.08, December 2021, Calgary, AB, Canada
Figure 1. Time series graphs of Wireshark test sessions for Spotify (Top) and YouTube Music (Bottom) (Oct 13, 2021)
around 30. Spotify was found to be using content delivery Observations of Spotify and YouTube Music were made at
networks (CDN) belonging to Akamai and Fastly. The Spo- a subjective level while using each service in testing. When
tify addresses belonged to the [Link]/13, and [Link]/10 listening to the same song in the same location with the
network, Akamai belonged to the [Link]/11 network, and same listening devices, YouTube Music seemed to have a
Fastly belonged to the [Link]/16 networks. YouTube Mu- higher audio quality than Spotify. Although while moving
sic shared various hosts all belonging to Google’s infrastruc- or in locations where Internet connection is variable, Spotify
ture. These belonged to various hosts on the [Link]/15, provides less pauses in music.
[Link]/16, and [Link]/24 networks. Table 3 shows the distribution of packet sizes for Spotify
Spotify and YouTube Music both primarily use secure TCP and YouTube Music tests on October 13, 2021. We can see
connections for data transfer. Spotify produced HTTP range that Spotify is sending twice as many packets than YouTube
requests during Wireshark testing while YouTube Music Music. The packet size distribution is bimodal, with many
used standard HTTP. On the other hand, YouTube Music large data packets, and many small control packets (ACKs).
also used QUIC, presumably Google’s version, in addition to Figure 1 shows the time series graphs of our Wireshark
TCP connections. tests from October 13th, 2021. The vertical axis is the number
CPSC 503.08, December 2021, Calgary, AB, Canada Lachlan Moore and Supervisor: Carey Williamson
Table 2. Main similarities and differences observed between Spotify and YouTube Music
Characteristic Similarities Differences
Service Both are music streaming services. YouTube Music also offers access to music videos.
Buffering Both services use a burst buffering at the same rate. YouTube Music uses fewer (but larger) bursts than Spotify.
Protocols Both use secure HTTP periodic connections and TCP. YouTube Music also uses QUIC, and Spotify uses HTTP range requests.
Infrastructure Both services make use of multiple servers. Spotify uses CDNs while YouTube Music uses its own servers.
Servers A small set of servers handle most of the workload. YouTube Music has more overall servers than Spotify.
Traffic Volume Both services have high volume traffic and continue to grow. Spotify send twice as many packets as YouTube Music.
Users Both services provide music to large number of users. Spotify has significantly more active users than YouTube Music.
Table 3. Packet size distributions of Spotify and YouTube the same service provider, for example, YouTube Music and
Music (Oct 13, 2021) YouTube are both owned by Google, we found overlapping
IP addresses. In our case, we found that both YouTube and
Packet Lengths 0-39 40-79 80-159 160-319 320-639 640-1279 1280-2559 Total Average
YouTube Music 0 4190 720 173 178 181 5984 11426 806.07 YouTube Music used heavy connections from Google Video
Spotify 0 8006 1488 353 441 364 9798 20450 751.12
IP addresses ([Link]/24). These findings created a prob-
lem in distinguishing traffic between YouTube Music and
of packets sent, the horizontal axis is the time of the Wire- YouTube at a network level.
shark trace in seconds, the red boxes represent the number of For the remainder of this study, we will focus on charac-
unacknowledged packets. The top graph shows the Spotify terising Spotify’s network performance at the campus level.
session, and the bottom graph shows the YouTube Music
session. 5 Macroscale Measurement Results
We can see that both Spotify and YouTube Music are send- In this section, we present our results of Spotify’s network
ing packets in bursts. These bursts are spaced quite similarly, performance at the campus level.
about ten seconds between each burst, for each streaming
service. Spotify has consistently spaced bursts of about 200 5.1 Traffic Profile
packets each throughout the whole session, while YouTube Figure 2 shows the number of connections initiated to Spotify
Music’s bursts are about double in size and are done less in each hour of the day on our campus over a 24 hour period,
than half as often as Spotify. These different rates of data on Wednesday September 22nd, 2021. The purple line refers
can be explained for various reasons such as, different bit to the amount of connections that were made to Spotify
rates, media quality levels, song buffering, etc. servers. The vertical axis shows the number of connections.
Finally, Figure 1 shows high initial rates of buffering in The horizontal axis shows the time of day in hours.
both graphs. Spotify shows significantly more initial buffer- We can observe a clear daytime active usage pattern for
ing compared to YouTube Music, with 3 large spikes of pack- Spotify, as expected. Network traffic changes related to the
ets to YouTube Music’s single packet spike. This is consistent time of day, as a result of common human usage of a network.
with the overall higher rate of buffering that Spotify is doing This graph shows us a steep growth in connections starting
in comparison to YouTube Music. in the morning, a peak around the early afternoon, and a
slightly slower decline in the late evening.
4.2 Comparison Table 4 shows how many connections, bytes sent and re-
Using the packet-level information collected from Wireshark, ceived, clients, and servers there were throughout the day
we can characterise the similarities and differences between of September 22nd. We are observing just under one mil-
Spotify and YouTube Music. Table 2 displays the main char- lion connections, 300 GBs of data, 16000 clients and fifteen
acteristics observed, with those being service type, buffer- different servers.
ing approach, protocols used, infrastructure servers, traffic Another observation is that there is an increasing amount
volume, and type of users. For example, in the buffering ap- of connections throughout the early afternoon of the day,
proach we see a very similar approach in timing, but different despite fewer clients compared to other parts of the day.
amounts of packets being sent. This suggests that due to the time of day many students
To map the IP addresses of Spotify and YouTube Music, are moving between lectures, lunch and other meetings and
we used DNS logs to find the IP addresses associated with hence dropping and re-establishing connections to the cam-
the host names. Additionally, by comparing multiple experi- pus network. Overall this behaviour would result in more
ments we also observed common high traffic IP addresses connections to Spotify servers, explaining this anomaly. In
being used. Utilizing both of these methods we were able our Bro logs the median length of connections shortens from
to obtain a distinct list of the main IP addresses used by 184.4 seconds to 120.7 seconds between 10:00 - 11:00.
each music streaming service. When conducting the same Figure 3 shows the frequency of connections and byte
active measurement methods on other applications from volume for servers and clients of Spotify on September 22nd,
Audio Streaming Application Performance:
A Comparative Study of Spotify and YouTube Music CPSC 503.08, December 2021, Calgary, AB, Canada
Table 4. Connections, bytes, clients and servers for Spotify one IP address, we also see a larger use of Spotify among
(Sept 22, 2021) those multiple clients. The drop off at around the 300th user
is due to static IP addresses. These static addresses belong to
Connections Bytes Sent Bytes Received Clients Servers various public and staff desktop computers around campus.
Spotify 935 920 81.0 GB 221.4 GB 16 784 15
Figure 2. Traffic profile for Spotify (Sept 22, 2021)
2021. The top graph shows the frequency rank of connec-
tions, while the bottom graph shows the frequency rank
of byte volume. Both graphs use a logarithmic scale on the
vertical and horizontal axis.
Both graphs in Figure 3 display the non-uniformity of traf-
fic across the IP addresses. We see in the upper graph that
about five servers, three Spotify and two Akamai, account
for 95% of the connections made throughout the day. Addi-
tionally three of these five servers, one Spotify and the two
Akamai, also make up for 97.4% of bytes sent. The two byte
heavy servers belong to the Akamai CDN and make up for
48.1% of the bytes being sent, while only making up for 14.2%
of connections. The remaining 49.3% of bytes being sent be- Figure 3. Frequency-rank profiles for Spotify connections
long to a single Spotify server. We can observe from this and byte volumes (Sept 22, 2021)
that Spotify contains servers to handle data transfer, mainly
being the Akamai CDN, and servers to handle connection We also see a large difference in the scale between the
management. number of connections and bytes. Some users and servers
With the client-side of the graph we also see highly non- create a large number of connections and bytes, while some
uniform traffic in terms of connections and bytes received. have very few connections and byte transfers. The mean
The top few client IP addresses each account for over 10,000 transfer size between Spotify and a user was 118295 bytes,
TCP connections per day, and over 1 GB of data traffic vol- while the median was 3034 bytes. While most connections
ume per day. At around the 300th ranked client IP address, are small, the large connections are way bigger and generate
we see a significant drop in the connection count and the the majority of the data. We may infer from this that there
number of bytes, although the drop in connections is steeper is a distinct difference in the types of users, power users and
in comparison to the byte count. This is mainly due to how regular users, using Spotify and the types of servers within
our campus network is set up using Network Address Trans- Spotify’s infrastructure.
lation (NAT). On the AirUC [Link]/24 subnet, there
are 255 IP addresses given to multiple devices. This means 5.2 Durations and Transfer Sizes
that one IP address has multiple users; students, staff and/or Next, we analyse the durations and transfer sizes of the TCP
faculty, on a single IP address. As there are more clients on connections created by Spotify sessions. We are specifically
CPSC 503.08, December 2021, Calgary, AB, Canada Lachlan Moore and Supervisor: Carey Williamson
focusing on the tails of these distributions, looking for evi-
dence of heavy-tailed behaviours.
Figure 4 provides a look into the tail behaviours of ob-
served TCP connections, using log-log complementary dis-
tribution (LLCD) plots. The leftmost graph is for the connec-
tion sizes in bytes, while the right graph is for the connection
lengths in seconds. Both graphs show graphical evidence of
heavy-tailed distribution. This is an unexpected behaviour as
a music streaming service, Spotify is not expected to exhibit
traits of applications that transfer large amounts of data.
A final observation that can be made from Figure 4 is the
difference between the sent and received data on the left-
most graph. The received data plot is consistently above the
amount of sent data. This observation reinforces previously
seen data in Table 4, that more information is being sent
to our campus than is being received. This is expected as
the population of Spotify users on campus consume Spotify Figure 5. LLCD Plot of Five Spotify Addresses with Most
content rather than create content. Connections
this traffic and how it may grow in the future once students
fully return to campus, is important to understanding and
improving our campus network. We observed that one of
the many music streaming services produces a significant
amount of traffic on the campus network. This traffic will
undoubtedly grow as more music streaming services start
to provide other features such as video sharing, podcasts,
audiobooks and more.
Figure 4. LLCD Plots of Empirical Distributions: Transfer These results highlight the importance of CDNs when it
Sizes (left) Connection Duration (right) comes to the delivery of network data. From our study, we
see the use of the Akamai CDNs by Spotify to deliver their
content. CDNs allow for the quick delivery of content to
5.3 Servers nearby users, which is important given the rise of popularity
Next, we analyse the specific transfer sizes of the TCP con- of new streaming services.
nections sent by the five most connection-heavy Spotify
servers. Once again we specifically focus on the tails of these 6 Conclusion
distributions, looking for evidence of heavy-tailed behaviour. In this study, we used passive and active measurement to
Figure 5 shows the tail behaviour for the Spotify servers analyse one entire day of music streaming traffic on our cam-
with the five highest connections, using LLCD plots. IP ad- pus network. This data was used to identify the similarities
dresses [Link] and [Link] both belong to the and differences between Spotify and YouTube Music at a
Akamai CDN, while the other three are Spotify addresses. All packet level as well as characterise Spotify at a campus level.
five servers show evidence of heavy-tailed behaviours, with Our study has presented several interesting findings. The
both Akamai addresses exhibiting these traits more than the number of connections created by Spotify is large and has
Spotify addresses. This is consistent with the overview of about 300 GB of data sent and received between users and
Spotify’s behaviour. From this we can infer how Spotify uses servers per day. We see a diurnal usage pattern for Spotify
the Akamai CDNs. With the larger transfer sizes coming as usage of the network changes throughout the day. Spotify
from Akamai’s servers, large, popular, static media would also had a heavy tail distribution for connection duration
mainly be stored in the Akamai CDN. Because smaller con- and transfer sizes.
nections come from Spotify, most of the smaller Web inter- Music streaming services are still gaining traction, as more
face connections are handled within Spotify’s own servers. variety is created and more features are being added for users.
The traffic characterisation of Spotify is bound to change as
5.4 Performance Implications music streaming services evolve. This study can help future
Observing about 300GB of daily traffic volume for one music studies of music streaming services to characterise their
streaming service was higher than expected. Considering network performance. As the COVID-19 pandemic begins to
Audio Streaming Application Performance:
A Comparative Study of Spotify and YouTube Music CPSC 503.08, December 2021, Calgary, AB, Canada
end, it will be interesting to see how network traffic changes year-end-music-industry-revenue-report/
and adapts to the influx of users once again. [6] G. Kreitz and F. Niemela. 2010. Spotify – Large Scale, Low Latency, P2P
Music-on-Demand Streaming. IEEE 10th Intl. Conference on Peer-toPeer
Computing (Aug. 2010), 1–10.
References [7] M. Laterman, M. Arlitt, and C. Williamson. 2017. A Campus-Level View
[1] MIDiA Research 2021. 2021. Global music subscriber market shares Q1 of Netflix and Twitch: Characterization and Performance Implications.
2021. Retrieved September 13, 2021 from [Link] Proceedings of SCS SPECTS (2017).
com/blog/global-music-subscriber-market-shares-q1-2021 [8] Taeko Onuki. 2021. 4:00 A.M. Retrieved November 22, 2021 from
[2] N. Basher, Aniket Mahanti, Anirban Mahanti, C. Williamson, and M. [Link]
Arlitt. 2008. A Comparative Analysis of Web and Peer-to-Peer Traffic. [9] Spotify Technology S.A. 2021. Spotify Company Info. Retrieved Sep-
Proceedings of WWW (April 2008), 287–296. tember 13, 2021 from [Link]
[3] Goodwater Capital. 2018. Understanding Spotify: Making Music [10] A. Sackl, S. Egger, and R. Schatz. 2013. Where’s the Music? Comparing
Through Innovation. (March 2018). [Link] the QoE Impact of Temporal Impairments between Music and Video
thesis/understanding-spotify#important-disclosures Streaming. Proceedings of Fifth International Workshop on Quality of
[4] Ernesto Van der Sar. 2014. Spotify Starts Shutting Down Its Multimedia Experience (QoMEX) (2013), 64–69.
Massive P2P Network. Retrieved September 16, 2021 from [11] A. Schwind, L. Haberzettl, F. Wamser, and T. Hoßfeld. 2019. QoE
[Link] Analysis of Spotify Audio Streaming and App Browsing. Proceed-
p2p-network-140416/ ings of 4th Workshop on QoE-based Analysis and Management of Data
[5] J. Friedlander. 2021. YEAR-END 2020 RIAA REVENUE STATISTICS. Communication Networks (Oct. 2019), 25–30.
Retrieved September 15, 2021 from [Link]