Thursday, August 30, 2018

The Spotify way

I’ve been talking about Scrum and Kanban. These are well known agile methodologies (or frameworks) that work well for teams until, say, 8 people. After that, you need to scale. You need to stop thinking about one team and think about one or more teams of teams.There are some frameworks that address this scale problem. I’ll start by analysing and describing Spotify model which is already a well known model.


The beginning

Spotify started in 2006 (their first music player was launched in 2008), as many other companies do, with agility in mind. They started using Scrum as a base methodology. This worked well for some time, until a certain level of growth. However, it started to get in the way. So they decided to start to experiment under the principle: “Fail fast, learn fast, improve fast”.


The birth of squads

The first thing they did was to make some Scrum practices optional, because to stay agile was more important than follow any model or framework. In order to remain coherent they renamed the scrum team to a squad and the scrum master to agile coach.

A squad is the primary organization level. It is a self organizing and cross functional team (usually less than 8 people) which is autonomous. This means that it has end-to-end responsibility on what they build (design, architecture, deploy, maintenant, operations, ...) and they decide how to build it.

Spotify has more than 50 squads spread across several locations, so they need a structure. Squads are grouped into tribes (which are light weight matrices) and chapters. Every team member in a tribe belongs to a squad as well as a chapter. In PMI terms, a squad corresponds to a project team and a chapter corresponds to a competency area such as agile coaching or web development. The chapter lead is like a line manager and its goal is to mentoring the people from the chapter as engineers. People can, for instance, switch squads and keep the same chapter and chapter lead.

Besides this, they also created guilds. Guilds are interest communities where people across the company share knowledge within a specific area such as leadership, web development or continuous delivery. They can have a mailing list, conferences or other means to share knowledge and have discussions on the subject matter.

Here you can find a picture extracted from http://labs.spotify.com explaining the all structure:

So, as you can see, this is not particularly innovative. In fact, even PMI and the waterfall projects and organizations have structures very similar to these. However, this is the easy part of organizing a company. The other, that I will describe next, is much more harder to achieve and it is where Spotify model succeeded: its culture.


Spotify culture

The Spotify culture is based on some key principles that I will enumerate in the following lines. As I said before, this is the most difficult part, where effort must be consumed every day and it is a never ending job.

Autonomy

This is the main principle and, for me, the one that drives all the others. As I said before, the squads are autonomous. The decision of how to do the stuff that needs to be done by the squad is taken within the squad. That also includes the tools that each squad uses. The leader’s job is to tell the squad what to do and why.

As everything in life, this autonomy has its boundaries:
  • Every squad has a mission and short term goals which are aligned with the product strategy and Spotify’s overall mission and goals
  • Every squad must be aligned with the other squads around. All the squads must be loosely coupled, but tightly aligned
Each squad is responsible for at least one system in spotify application/ecosystem. Every system interacts with other systems. If you are experienced with software development you are already seeing that these systems and their dependencies in one single application transform each and every deployment into a nightmare. Imagine all the 1200 people depending on each other for doing a deployment… Crazy, right? They are also committed in making releases easy and routine. It seemed contradictory, so they needed to find a solution to combine both things and keep squads autonomous. Instead of defining a set of complex rules to manage the dependencies and synchronization between systems and squads, they changed their architecture. Their application is now a web browser in disguise. Each system is like a frame in their “browser”. This enabled decoupled releases and provided a way to reduce dependencies between squads and keep squads autonomous.

Sense of community

For Spotify, the community and the collaboration among all its members is more important than structure. For instance, in terms of tools, there is low standardization. This means that, for a given action a squad can select whatever tool they think is best fitted. As more and more squads start to selecting the same tool and providing informal support to it, it becomes a “path of least resistance” and a defacto standard emerges. It is the community and not some hierarchical enlightened chief that decides the tools to use.

Another example relates to code. They have an internal open-source model. No squad is the owner of any code. All the community is responsible and invited to do whatever needs to be done. Imagine that squad 1 is responsible for system A and squad 2 is responsible for system B. If system A needs a modification on system B, as squad 2 is more familiar with that code, squad 1 will ask squad 2 to make the required modifications. However, if squad 2 has no time to do it, instead of waiting, squad 1 is completely free to go and make the modifications on system B. After those modifications, squad 2 will do a code review of squad 1’s modifications.

Fail safe environment

Along the process of building and growing a company, is inevitable that problems and failures will occur. For that reason Spotify kind of celebrates the mistakes. Of course, not in a self-punishing or masochist way. They use this mistakes not to blame people or squads, but as knowledge to be shared by all Spotify community. Besides that, you must recognize that the titles like “How we shoot ourselves in the foot” are quite “catchy” ;)

So learning through failure is OK. However, if you fail too much or in catastrophic ways you can get to a point where the customers will see your app/service as unreliable. To mitigate those failures they followed a “limited blast radius” approach. First of all, they aim to have a decoupled architecture. This means that, if you deploy something that is not OK, it usually has a limited effect on the entire application. On the other hand, they do gradual rollouts of new features. This means that (again) if something is not OK, it will only affect a small group of users.

Creative friendly environment

A fail safe environment has another side effect: it reduces the fear of innovate. In fact, Spotify is also known by allocating 10% of its workers’ time for hacking. It also has a hack week where people “do whatever, with whoever in whatever way”.

In fact, there is another interesting approach that is followed to implement innovative hypotheses. When some new feature or improvement is proposed it is implemented and rolled out gradually. As soon as the feature is released for a limited set of users, data is immediately collected and analysed. If users like it and use it, a bigger group of users gets to see the new feature and the cycle is repeated until the complete rollout is made. Otherwise, the feature is dumped. The innovation is driven by data and evidences and not by opinion, ego or authority.


Conclusion

Spotify is one of those organizations where continuous learning, continuous improvement flexibility and innovation are crucial facets of its culture. Does it mean that it is perfect? Of course not. In fact, the characteristics described here are somewhere in the middle of where they are and where they want to be. There is much room for improvement. However, with this mindset, each days that passes puts them closer to their goal.

No comments:

Post a Comment

Drive

Drive , a 2009 book by Daniel H. Pink, is a story about what motivates us. It argues that punishment and rewards that organizations and man...