The Real Success Story of Microservices Architectures
Learn about how just adopting a few new tools doesn’t mean you’re implementing a microservice architecture successfully.
Join the DZone community and get the full member experience.Join For Free
we hear the benefits of microservices architectures loud and clear; we hear the constant drum beat of how/why/by all means/etc you should be doing microservices; we know companies such as amazon , netflix and gilt have successful microservices architectures.
however, as i’ve touched on in my blog post titled you’re not going to do microservices , getting microservices right – and being able to add your company or organization to the list of success stories – is difficult. just deciding to use dropwizard / springboot / wildflyswarm /flat classloader/ docker etc doesn’t mean you’re doing microservices. in fact, prematurely breaking your apps/services down into smaller services has significant tradeoffs and could lead to a soa on steroids disaster. even the venerable martin fowler agrees with me .
so when we talk about the success stories of microservices at conferences, on developer blogs, etc. i think we’re missing the point. the successes aren’t about which dependency manager, or classloader structure, or linux container, or cloud service to use. they aren’t about mythical internet web-scale unicorns or their architects. i think it’s about something a bit more fundamental, albeit, less sexy than docker/kubernetes/springboot.
the real success?
the real success stories of a microservice architecture are about how organizations that embrace small, cross-functional teams that engage with a flat, self/peer-management structure, are able to scale and innovate at levels unheard of in traditional organizational structures and do it wildly successfully.
i had the pleasure to work closely with teams at amazon and learn about their organizational culture. one tenant of their structure was that organized teams had to follow the “two-pizza” rule. simply, a team could not be larger than what two pizzas could feed. the thinking behind this was summed up by an amazon ceo jeff bezos quote :
managers: we need more communication on and between our teams
bezos: no. communication is terrible”
to create and sustain autonomous, creative, innovative teams, you don’t want “more communication” you want “effective communication.” this is easier said than done, but it starts by having smaller groups of people work together. they get to know each other better, they form relationships, trust, and motivation. there is less chance of group think or social loafing .
j richard hackman studied team and group dynamics found that the communication links between members grows as you add more people to a team following this equation:
(n * n-1) / 2
as the number of links grow within a team (ie, more members), the communication degrades and team productivity similarly degrades. the number hackman settled on was something less than 10. amazon teams usually consist of 6-8 members. navy seals work in combat teams of 4. the number is not hard and fast, but it should be small. in fact, just stop and think about social situations you encounter ever day. is it easier to have a conversation and relate to one another in large groups (ie, at a wedding, people break off into smaller groups to chat)?
i highly recommend reading hackman’s article here about why teams don’t work .
i saw this quote recently that can perfectly sum up why a team should be cross-functional:
bad behavior arises when you abstract people away from the consequences of their actions
creating more functional silos seems to have the effect of “encouraging bad behavior”. for example, developers should be focused on writing and delivering quality code. they should also be thinking about non-functional aspects like security, performance, scalability, high availability, etc. however if you start creating application database teams, or qa teams, or separate operations teams, then developers seem to focus on “getting features in” and throwing the rest over the proverbial fence.
do these sound familiar?
- “i dont have time for testing, qa does that”
- “i don’t have to know how the database works, the dba does that”
- “i just code it, operations makes it highly available”
the opposite to this, is to have teams be cross-functional: have a database, operations, test, person on the same team. or have individuals take on multiple roles. this is what a lot of these internet unicorn companies do (amazon, netflix, facebook, google, etc). this way, what your team builds, you’re responsible for it. there’s no chance for “throwing over the fence” and absolving yourself of responsibility of building quality software. in this vein, there is no such thing as a devops team . these practices are ingrained in all of the teams.
conway’s law helps tie the above two points together. conway stated:
organizations which design systems … are constrained to produce designs which are copies of the communication structures of these organizations
and we see some of the rigidity of traditional architectures (including those that embraced soa) because of this simple law. hierarchical, siloed, organizations build systems that are rough copies of themselves. people, processes, and communication have been molded around this structure for ages. this does not scale in such a way to allow autonomy and innovation. so if we want to build scalable systems like we talk about with microservices, we have to start with building scalable organizational structures. then conways law follows that the communication structures (within and between smallish, loosely coupled, cross-functional teams) we create will be found in the systems we design.
if you squint, you’ll start to see that these small, cross-functional, microservices teams start to look like and behave like small open-source projects do. people work together, they aren’t afriad to share their opinions, they’re passionate about building quality software and since they’re small and focused they seem to follow conway’s law by building modular software. they are developers, testers, ops, etc all working together toward a common goal. and that’s what devops and microservices is really about.
soa vs microservices?
again, to reiterate, in my opinion the success stories about microservices that we hear about are not necessarily technological success stories, and we run the risk of missing the point and going down the same path soa took. soa had a lot of the same principles that are the foundation of microservices, but soa lost sight of the finish line. people startin doing soa just because it was soa, and vendors, committees, and consortiums came together to give us specs we “needed”. ultimately, soa had some of the same goals about organizational structure, but those got lost in ws-* spcs.
there is no doubt tooling and processes are important, even in a microservices world, but those should follow the principles that are rooted in organizational structures.
this post is already getting long, but in my next post, i’ll want to point out some of the things we’re doing in the openshift and fabric8io projects that aim to simplify things for cross-functional developers working in microservices teams but without overlooking the important foundations of social, organziational, and communication aspects of a microservice team.
Published at DZone with permission of Christian Posta, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.