A look into how we've built Runscope using a microservice architecture.
Scale-orientedArchitecture with APIsJohn SheehanCo-founder, CEO@Runscope
View Slide
Scale-orientedArchitecture with APIsMICROSERVICES
API DEBUGGINGAPI MONITORINGFOR TEAMS
30,000+developersuse Runscope
MICROSERVICESat Runscope
MICROSERVICES =SOA + DevOps
If you don't invest inINFRASTRUCTUREdon't invest inMICROSERVICES
In the beginning...
runscope.com Runscope URLsIdentityRequest Vaultapi.runscope.comEventadorCalculonCourierMission ControlPassagewaygo-proxyWarp Pipe go-radarEventsAuth ServiceFile CabinetScript ProcessorAtlasArchivistPrometheusBillingScorekeeper
Today40+ internal services9 engineers
Howmicroshouldservices be?
MICROSERVICESGOALS
Scaling the StackGOAL #1
IndependentDeployability
7,789Deployments in 201431+Per work day
Service-levelIsolation
IndependentScalability
NetworkResiliency
Scaling the TeamGOAL #2
NetworkMindset
IsolateBreakage
HumanModularity
UniformInterface
DeveloperExperience
Smart Client
• Service discovery• service://identity/...• Retry failed GETs• Run HTTP requests asynchronously• Log with Runscope Traffic InspectorSmart Client
url = "https://ec2-23-212-199-23.us-west-2.amazonaws.com"resp = requests.get(url)if resp.ok:return resp.json()else:# retry?return Nonedef get_user(id):def main():user = get_user(id)print user["name"]
class Identitydef get_user(id):url = "service://identity/users/" + idresp = smart_client.get(url)if resp.ok:return User(resp.json())return AnonymousUser()from Identity import get_userdef main():user = get_user(id)print user.nameAuto-locateserviceSmartretries
Smart Service
• Built-in healthcheck/heartbeat endpoints• Automatic, realm-aware service registry• Common logging and metrics framework• Simplified dependency managementSmart Service
Testing &Monitoring
APITestingAPIMonitoringFunctionality AvailabilityPerformanceCorrectnessIn Development In Production"Transactions" "Endpoints"
Runscope RadarFunctionality AvailabilityPerformanceCorrectnessAny EnvironmentAPI Testing & MonitoringTransactions & Endpoints
Try Runscope, free.runscope.comStop by our table for your free t-shirt!