A Microservices Architecture That Emphasizes Rapid Development (That Conference)
-
Upload
rob-hruska -
Category
Software
-
view
273 -
download
1
Transcript of A Microservices Architecture That Emphasizes Rapid Development (That Conference)
A Microservices Architecture
That Emphasizes Rapid Development
@robhruska
@HudlEngineering
Customers○Coaches○Athletes○Recruiters○Video Coordinators
○Analysts○Parents○Alumni○Fans
4.5MM active users130K teams
10K reqs/secondC# / JavaScript /
MongoDBAmazon Web Services
Culturally Fast / Rapid○Small cross-cutting squads○Ship early, ship often; MVP○Anyone can deploy, anytime○Deploys, rollbacks are fast and easy○Low friction for service operation
2 3 41h 2 3 6 1d12 18 5 6 7 14 21 22+
10
20
30
40
50
60
Branch Lifecycle Duration
Exploring ► Implementing ► Improving
If you wish to make an apple pie from scratch,you must first invent the universe.
Carl Sagan
“
Problems to Solve□ Configuration□ Deployment□ Routing□ Service Discovery□ Dev. Lifecycle□ Monitoring / Tracing
□ Logging□ Testing□ Security□ ...
Monoliths vs. Microservices
Monoliths vs. Microservices
Cross-Domain Development
Monoliths vs. Microservices
Deployment Workflows
800
100
Deploys / Week by Environment
~ 46 contributors
Total # Product Team Members / Week
organizations which design systems ... are constrained to produce designs which are copies of
the communication structures of these organizations
Melvin Conway
“
public class RouteConfig : IRouteConfig { public IEnumerable<string> GetApplicationRoutes() { return new List<string> { "speedtest.*", "api/v2/speedtest/.*", "bifrost/speedtest/.*", "scripts/speedtest/.*", "bundles/speedtest/.*", "css/speedtest/speedtest.css", }; }
[BifrostService]public interface ISpeedTestResultService{ [Path("speedtest-result/get-latest-result-for-user")] [Idempotent] Task<SpeedTestOverallResultDto> GetLatestResultForUser(
string userId,CancellationToken? token = null);
}}
using Hudl.Bifrost.Location;using Hudl.SpeedTest.Client.Services;
var result = await ServiceLocator.Get<ISpeedTestResultService>()
.GetLatestResultForUser(userId);
Architecture Flows With Organizational
Structure
New Service IntroductionTeam Reorganization
○ New squads / business focus
○ Shifting focus / domain○ Replacing functionality
Reactionary
○ Deploy queue○ Build times○ Code size○ Targeted migration
Deploys / Week, Basketball
MicroservicesLoosely coupledService orientedBounded contexts
speedtest
14 files< 1000 LOC
1 Page0 APIs
1 Endpoint
users recruit
222 files44k LOC
3 Pages8 APIs
78 Endpoints
1900 Files400k LOC
Dozens ofpages & APIs64 Endpoints
Tiny
Small
Medium
Large
Mega
# Services by Size
MicroservicesLoosely coupledService orientedBounded contexts
Lessons Learned & The Future
Thanks!@robhruska robhruska.comgithub.com/robhruska
@HudlEngineeringhudl.github.iopublic.hudl.com/bits/