ServiceBridge: Azure to AWS by Audrius Ziemelis

Kaunas Java User Group
Kaunas Java User GroupSenior Java Software Engineer at Kaunas Java User Group
Audrius Žiemelis
www.devbridge.com/people
ServiceBridge: Azure to AWS
January, 2016
What is ServiceBridge?
ServiceBridge field service management software is designed to assist
franchise businesses with work order scheduling and distribution, eliminate
paperwork and engage customers to increase sales. We’ve had great success
with landscape maintenance, carpet cleaning, pool cleaning, pest control, and
disaster clean up service franchises.
Facts
• Company count: 556 (646)
• User count: 1751 (2129)
• Customer count: 1 467 283 (2 051 145)
• Job count: 5 995 674 (8 557 062)
• Database size:
Shard1 - 34Gb (43Gb)
Shard2 - 31Gb (37Gb)
SB - 12Gb (18Gb)
• ElasticSearch size: 32Gb (10Gb)
ServiceBridge components (Azure)
• SQL Profiler (only locally)
• Logging improvements to ElasticSearch
• NewRelic
Monitoring tools
Attempts to keep wheels running...
Infrastructure:
• Distributed Cache implementation
• Database 2nd shard implementation (by CompanyId)
• ElasticSearch – 3 smaller nodes with more RAM instead of 2 big
• MSSQL Index maintenance
Software:
• Bulk inserts / updates (NHibernate.IStatelessSession)
• DynamicUpdate anotation
• new TransactionScope() – by default Serializable!
• NHibernate IsDirty check
The last drops of patience
• DTU – what is 250 or 500?
• Azure SQL: P1 → P2 → P4 → P6 → P11…
• Azure SQL Price: $465 → $930 → $1860 → $3720 → $7001
• Performance is still bottleneck
• Cost cost cost!
Text
Text
Text
Text
IAM
VPC
EC2
Directory Service
CloudTrail
CloudWatch
SNS
ElastiCache
S3
Lambda
CodeDeploy
Trusted Advisor
CloudFormation
ServiceBridge: Azure to AWS by Audrius Ziemelis
Infrastructure
● 2 x Web Servers (SB360) (c4.xlarge, 4 vCPU, 7.5 GB Memory)
● 2 x API Servers (c4.xlarge, 4 vCPU, 7.5 GB Memory)
● 2 x Web Servers (c4.large, 2 vCPU, 3.75 GB Memory)
● 2 x SQL Servers (r3.2xlarge, 8 vCPU, 61 GB Memory)
● 1 x SQL Servers (r3.xlarge, 4 vCPU, 30.5 GB Memory)
● 3 x ElasticSearch servers (for search), (r3.large, 2 vCPU, 15.25 GB Memory)
● 2 x ElasticSearch servers (for logs), (r3.large, 2 vCPU, 15.25 GB Memory)
● 2 x NAT Servers (m3.medium, 1 vCPU, 3.75 GB Memory)
● 1 x Redis Cache cluster with 2 nodes (m3.medium, 1 vCPU, 2.78 GB Memory)
● 3 x Public load balancers (Web and API Servers)
● 2 x Internal load balancers (SB360 and API Servers)
● 2 x Internal load balancers (ElasticSearch Servers)
Load
SB360:
● Web: ~1200 rpm
● Non-Web: ~1200 rpm
● DB: ~3000 rpm
● Redis: ~1100 rpm
API:
● API: ~1300 rpm
● Non-Web: ~8000 rpm
● DB: ~17000 rpm
What has changed?
• Communication with „Cloud“:
- Active Directory
- VPN
• NAT Server:
- Outbound traffic goes through NAT server
- Only two public IPs
• Web servers
- 3 couples of web servers (2 x Web, 2 x API, 2 x Everything else)
- DFS (IIS configuration is synchronized between servers)
What has changed?
• SQL Server:
- EC2 instead of SQL as a Service (RDS)
- Web edition
- Backups to S3 (Bucket lifecycle rules)
- Accessible only from VPC
• Redis Cache
- No built-in security
- Accessible only from VPC
- Security controlled via Security Groups
What has changed?
• ElasticSearch:
- 5 Linux servers (2 x logs, 3 x search)
- Isolated Staging and Production environments
- Accessible only from VPC
- Backup strategy: snapshots
- Heap memory size configuration
• Reverse engineering VPC:
- CloudFormation
- Separate Linux EC2 instance to “script” VPC (shutdown)
Deployments
• CCNET to Team City
• Single build for all solutions: ~23 mins vs > 60 mins
• Deployment packages are stored on S3
• Lambda service triggers CodeDeploy service
• CodeDeploy deploys packages to EC2 instances one at a time
• Configuration may vary:
- One at a time
- Half at a time
- All at once
Migration day
• Source code and configuration:
In advance
• Web sites stopped using app_offline.htm
• Database migration:
From Azure SQL using .bacpac
From Azure VM using .bak
• ElasticSearch:
Using snapshot / restore functionality
Migration day issues
• App_Offline.htm design (Arnold Schwarzenegger vs. Pretty lady)
• What pizzas to order for lunch?
• Minor issues (outdated configuration, third party components security)
• Main functionality restored in 2 hours 30 mins
• Regarding to boss – it was the most complicated and smoothest migration in
his career!
5 months since migration…
• 0 night calls
• 100% uptime
• Average response time is stable on peak time
• $11k/month → $6k/month
Questions?
1 of 33

Recommended

Presentation by
PresentationPresentation
PresentationKaunas Java User Group
614 views12 slides
Smart House Based on Raspberry PI + Java EE by Tadas Brasas by
Smart House Based on Raspberry PI + Java EE by Tadas BrasasSmart House Based on Raspberry PI + Java EE by Tadas Brasas
Smart House Based on Raspberry PI + Java EE by Tadas BrasasKaunas Java User Group
469 views19 slides
Automated infrastructure by
Automated infrastructureAutomated infrastructure
Automated infrastructureKaunas Java User Group
785 views34 slides
Adf presentation by
Adf presentationAdf presentation
Adf presentationKaunas Java User Group
1.4K views1 slide
Bye Bye Cowboy Coder Days! (Legacy Code & TDD) by
Bye Bye Cowboy Coder Days! (Legacy Code & TDD)Bye Bye Cowboy Coder Days! (Legacy Code & TDD)
Bye Bye Cowboy Coder Days! (Legacy Code & TDD)Kaunas Java User Group
1.3K views34 slides
Building with Gradle by
Building with GradleBuilding with Gradle
Building with GradleKaunas Java User Group
1.7K views17 slides

More Related Content

More from Kaunas Java User Group

Apache Lucene Informacijos paieška by
Apache Lucene Informacijos paieška Apache Lucene Informacijos paieška
Apache Lucene Informacijos paieška Kaunas Java User Group
628 views27 slides
Java 8 Stream API (Valdas Zigas) by
Java 8 Stream API (Valdas Zigas)Java 8 Stream API (Valdas Zigas)
Java 8 Stream API (Valdas Zigas)Kaunas Java User Group
2K views27 slides
Intro to Java 8 Closures (Dainius Mezanskas) by
Intro to Java 8 Closures (Dainius Mezanskas)Intro to Java 8 Closures (Dainius Mezanskas)
Intro to Java 8 Closures (Dainius Mezanskas)Kaunas Java User Group
4.6K views25 slides
Kaunas JUG#1: Intro (Valdas Zigas) by
Kaunas JUG#1: Intro (Valdas Zigas)Kaunas JUG#1: Intro (Valdas Zigas)
Kaunas JUG#1: Intro (Valdas Zigas)Kaunas Java User Group
637 views10 slides
Kaunas JUG#1: Java History and Trends (Dainius Mezanskas) by
Kaunas JUG#1: Java History and Trends (Dainius Mezanskas)Kaunas JUG#1: Java History and Trends (Dainius Mezanskas)
Kaunas JUG#1: Java History and Trends (Dainius Mezanskas)Kaunas Java User Group
928 views33 slides
Kaunas JUG#2: Devoxx 2013 (Saulius Tvarijonas) by
Kaunas JUG#2: Devoxx 2013 (Saulius Tvarijonas)Kaunas JUG#2: Devoxx 2013 (Saulius Tvarijonas)
Kaunas JUG#2: Devoxx 2013 (Saulius Tvarijonas)Kaunas Java User Group
699 views10 slides

Recently uploaded

Why and How CloudStack at weSystems - Stephan Bienek - weSystems by
Why and How CloudStack at weSystems - Stephan Bienek - weSystemsWhy and How CloudStack at weSystems - Stephan Bienek - weSystems
Why and How CloudStack at weSystems - Stephan Bienek - weSystemsShapeBlue
172 views13 slides
Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ... by
Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ...Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ...
Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ...ShapeBlue
121 views15 slides
CloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlue by
CloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlueCloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlue
CloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlueShapeBlue
68 views13 slides
How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ... by
How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...
How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...ShapeBlue
97 views28 slides
Network Source of Truth and Infrastructure as Code revisited by
Network Source of Truth and Infrastructure as Code revisitedNetwork Source of Truth and Infrastructure as Code revisited
Network Source of Truth and Infrastructure as Code revisitedNetwork Automation Forum
49 views45 slides
Migrating VMware Infra to KVM Using CloudStack - Nicolas Vazquez - ShapeBlue by
Migrating VMware Infra to KVM Using CloudStack - Nicolas Vazquez - ShapeBlueMigrating VMware Infra to KVM Using CloudStack - Nicolas Vazquez - ShapeBlue
Migrating VMware Infra to KVM Using CloudStack - Nicolas Vazquez - ShapeBlueShapeBlue
147 views20 slides

Recently uploaded(20)

Why and How CloudStack at weSystems - Stephan Bienek - weSystems by ShapeBlue
Why and How CloudStack at weSystems - Stephan Bienek - weSystemsWhy and How CloudStack at weSystems - Stephan Bienek - weSystems
Why and How CloudStack at weSystems - Stephan Bienek - weSystems
ShapeBlue172 views
Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ... by ShapeBlue
Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ...Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ...
Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ...
ShapeBlue121 views
CloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlue by ShapeBlue
CloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlueCloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlue
CloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlue
ShapeBlue68 views
How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ... by ShapeBlue
How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...
How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...
ShapeBlue97 views
Migrating VMware Infra to KVM Using CloudStack - Nicolas Vazquez - ShapeBlue by ShapeBlue
Migrating VMware Infra to KVM Using CloudStack - Nicolas Vazquez - ShapeBlueMigrating VMware Infra to KVM Using CloudStack - Nicolas Vazquez - ShapeBlue
Migrating VMware Infra to KVM Using CloudStack - Nicolas Vazquez - ShapeBlue
ShapeBlue147 views
Digital Personal Data Protection (DPDP) Practical Approach For CISOs by Priyanka Aash
Digital Personal Data Protection (DPDP) Practical Approach For CISOsDigital Personal Data Protection (DPDP) Practical Approach For CISOs
Digital Personal Data Protection (DPDP) Practical Approach For CISOs
Priyanka Aash103 views
Confidence in CloudStack - Aron Wagner, Nathan Gleason - Americ by ShapeBlue
Confidence in CloudStack - Aron Wagner, Nathan Gleason - AmericConfidence in CloudStack - Aron Wagner, Nathan Gleason - Americ
Confidence in CloudStack - Aron Wagner, Nathan Gleason - Americ
ShapeBlue58 views
Data Integrity for Banking and Financial Services by Precisely
Data Integrity for Banking and Financial ServicesData Integrity for Banking and Financial Services
Data Integrity for Banking and Financial Services
Precisely76 views
NTGapps NTG LowCode Platform by Mustafa Kuğu
NTGapps NTG LowCode Platform NTGapps NTG LowCode Platform
NTGapps NTG LowCode Platform
Mustafa Kuğu287 views
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlue by ShapeBlue
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlueWhat’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlue
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlue
ShapeBlue191 views
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue by ShapeBlue
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlueCloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue
ShapeBlue63 views
Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit... by ShapeBlue
Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit...Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit...
Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit...
ShapeBlue86 views
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N... by James Anderson
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...
James Anderson142 views
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ... by ShapeBlue
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...
ShapeBlue52 views
Business Analyst Series 2023 - Week 4 Session 7 by DianaGray10
Business Analyst Series 2023 -  Week 4 Session 7Business Analyst Series 2023 -  Week 4 Session 7
Business Analyst Series 2023 - Week 4 Session 7
DianaGray10110 views
Future of AR - Facebook Presentation by Rob McCarty
Future of AR - Facebook PresentationFuture of AR - Facebook Presentation
Future of AR - Facebook Presentation
Rob McCarty54 views

ServiceBridge: Azure to AWS by Audrius Ziemelis

  • 2. What is ServiceBridge? ServiceBridge field service management software is designed to assist franchise businesses with work order scheduling and distribution, eliminate paperwork and engage customers to increase sales. We’ve had great success with landscape maintenance, carpet cleaning, pool cleaning, pest control, and disaster clean up service franchises.
  • 3. Facts • Company count: 556 (646) • User count: 1751 (2129) • Customer count: 1 467 283 (2 051 145) • Job count: 5 995 674 (8 557 062) • Database size: Shard1 - 34Gb (43Gb) Shard2 - 31Gb (37Gb) SB - 12Gb (18Gb) • ElasticSearch size: 32Gb (10Gb)
  • 5. • SQL Profiler (only locally) • Logging improvements to ElasticSearch • NewRelic Monitoring tools
  • 6. Attempts to keep wheels running... Infrastructure: • Distributed Cache implementation • Database 2nd shard implementation (by CompanyId) • ElasticSearch – 3 smaller nodes with more RAM instead of 2 big • MSSQL Index maintenance Software: • Bulk inserts / updates (NHibernate.IStatelessSession) • DynamicUpdate anotation • new TransactionScope() – by default Serializable! • NHibernate IsDirty check
  • 7. The last drops of patience • DTU – what is 250 or 500? • Azure SQL: P1 → P2 → P4 → P6 → P11… • Azure SQL Price: $465 → $930 → $1860 → $3720 → $7001 • Performance is still bottleneck • Cost cost cost!
  • 10. IAM
  • 11. VPC
  • 12. EC2
  • 16. SNS
  • 18. S3
  • 24. Infrastructure ● 2 x Web Servers (SB360) (c4.xlarge, 4 vCPU, 7.5 GB Memory) ● 2 x API Servers (c4.xlarge, 4 vCPU, 7.5 GB Memory) ● 2 x Web Servers (c4.large, 2 vCPU, 3.75 GB Memory) ● 2 x SQL Servers (r3.2xlarge, 8 vCPU, 61 GB Memory) ● 1 x SQL Servers (r3.xlarge, 4 vCPU, 30.5 GB Memory) ● 3 x ElasticSearch servers (for search), (r3.large, 2 vCPU, 15.25 GB Memory) ● 2 x ElasticSearch servers (for logs), (r3.large, 2 vCPU, 15.25 GB Memory) ● 2 x NAT Servers (m3.medium, 1 vCPU, 3.75 GB Memory) ● 1 x Redis Cache cluster with 2 nodes (m3.medium, 1 vCPU, 2.78 GB Memory) ● 3 x Public load balancers (Web and API Servers) ● 2 x Internal load balancers (SB360 and API Servers) ● 2 x Internal load balancers (ElasticSearch Servers)
  • 25. Load SB360: ● Web: ~1200 rpm ● Non-Web: ~1200 rpm ● DB: ~3000 rpm ● Redis: ~1100 rpm API: ● API: ~1300 rpm ● Non-Web: ~8000 rpm ● DB: ~17000 rpm
  • 26. What has changed? • Communication with „Cloud“: - Active Directory - VPN • NAT Server: - Outbound traffic goes through NAT server - Only two public IPs • Web servers - 3 couples of web servers (2 x Web, 2 x API, 2 x Everything else) - DFS (IIS configuration is synchronized between servers)
  • 27. What has changed? • SQL Server: - EC2 instead of SQL as a Service (RDS) - Web edition - Backups to S3 (Bucket lifecycle rules) - Accessible only from VPC • Redis Cache - No built-in security - Accessible only from VPC - Security controlled via Security Groups
  • 28. What has changed? • ElasticSearch: - 5 Linux servers (2 x logs, 3 x search) - Isolated Staging and Production environments - Accessible only from VPC - Backup strategy: snapshots - Heap memory size configuration • Reverse engineering VPC: - CloudFormation - Separate Linux EC2 instance to “script” VPC (shutdown)
  • 29. Deployments • CCNET to Team City • Single build for all solutions: ~23 mins vs > 60 mins • Deployment packages are stored on S3 • Lambda service triggers CodeDeploy service • CodeDeploy deploys packages to EC2 instances one at a time • Configuration may vary: - One at a time - Half at a time - All at once
  • 30. Migration day • Source code and configuration: In advance • Web sites stopped using app_offline.htm • Database migration: From Azure SQL using .bacpac From Azure VM using .bak • ElasticSearch: Using snapshot / restore functionality
  • 31. Migration day issues • App_Offline.htm design (Arnold Schwarzenegger vs. Pretty lady) • What pizzas to order for lunch? • Minor issues (outdated configuration, third party components security) • Main functionality restored in 2 hours 30 mins • Regarding to boss – it was the most complicated and smoothest migration in his career!
  • 32. 5 months since migration… • 0 night calls • 100% uptime • Average response time is stable on peak time • $11k/month → $6k/month