Dubbo and Weidian's Practice On Microservice Architecture en
Dubbo and Weidian's Practice On Microservice Architecture en
Architecture
Speaker:Xin Wang
Who's Weidian
CONTENTS
The stages of Weidian
• 70 million stores, 1 billion • 5.6 million attacks / • In IDC, • 600+ RD work together
goods; 9P data days; 2016/2017, our • 60 times a day on the
• Payment, search,
• CC、SQLInjection、 total line, 400+ release
recommendation, risk
XSS、CSRF ... expenditure is (including test / Pre
control, IM, transaction,
• 600 million + daily tens of millions deployment
open platform,
adver tising, supply chain... visit of crawlers... of RMB. environment)
Dubbo and Weidian's Practice on Microservice
Architecture
Speaker:Xin Wang
Who's Weidian
CONTENTS
The stages of Weidian
DB
DB Technology stack
SELL Search Recommend DB
l Testing is difficult: requires all
functional regression
Some related apps
Promotion l Scalability: weak
l Edge BUG, such as dead loop, OOM,
DB DB
and so on, drag down the entire site.
Multi module stage
Technology stack
shop l PHP
l Nginx
item l Mysql
l Redis
Problems encountered
l Code splitting, independent deployment, process isolation,
trade order refund
technology stack has not changed much.
l Problems:
• It is difficult to upgrade,because need to push the
whole site
promotion • The pressure of the database connection pool is great
Servitization stage
Trade
Creat
l Service group appears, order center:
order
item center, trading center, etc.
l Technology stack:
Item center Order promotion
• Dubbo
Order
item
query
Promotion
• VTrace
management
• Vdds
Report
SKU stock Task
l Technology stack:
• Problem tracking is difficult
refund
• Configuration is troublesome, ops
refund
have heavy work
complain • Difficulty in testing: interference with
each other
Dubbo and Weidian's Practice on Microservice
Architecture
Speaker:Xin Wang
Who's Weidian
CONTENTS
The stages of Weidian
u Microservice:
• System consisting of distributed services
• Organize organizations by business rather
than technology
Split principle:
• Automated operation and maintenance • DDD Business-driven
• Rapid evolution of service iteration
• Balance of design,
u DDD Domain-driven Design
engineering, operations,
• Solve core issues in the domain by building domain models
• Implementation of code driven by domain models
etc.
• Technical architecture design or data storage, etc. are on the • Progressive evolution
periphery of the domain model
• DDD vs SSI(spring+hibernate): congestion model / blood loss
model
Servitization-Automated deployment
l Virtualization
Virtualization Manage
• KVM
• Docker
l Network mode
infrastructure • Bridge
ü Pipework
cpu/memor y/disk/network ü Libvirt
• Configuring unique IP, and
interworking all over the network
Servitization-Call link tracking
ES http proxy …..
Consol
e
Dist
kdserv Buy/car/
ribu …..
er ……
Hbase/MR qua tion
API
ke
Weidia Sea
shop Buyer …..
n 2.0 rch
Fuse,downgrade,isolate
Limit flow
Service governance client
Core: Hystrix
Servitization-Business challenge: double alive
l Strategy:
• New and old machine room share a Dubbo root root
node
• The service of the new computer room is registered
under the same service directory. In the URL, the
belongTo attribute needs to be added.
• If all the local services are down, the router will be
routed to the remote execution.
l Changes:
• The Dubbo router policy needs to be re
implementeddubbo
• The timeout retry strategy needs to be
reimplemented
Servitization-Summary
suppor t for the business
Thanks to Dubbo's
Who's Weidian
CONTENTS
The stages of Weidian
l Method:
Use a effective language to develop a agent, other than
JAVA language can interact through the agent process Service A SideCar SideCar Service B
and registry. (Service mesh sidecar mode)
Benefit : Business
Logic
Agent Agent Business
Logic
Problem:
A node has been added: when the agent process is Registry
abnormal or hangs, the business process of the agent
service has to remove the traffic.
About the future- Silver Bullet or not,When dubbo
meet Service mesh
View: 1. For the use of technology, it depends on the stage of business development. 2. For
the new technology ecology: Please use some of his ideas, such as sidecar, such as
this multi-language client practice Service Mesh’s
Control Plane
Flow Flow
Control Control
Networking Networking
Stack Stack
About the future- Dubbo+Reactive programming
Principle of Finagle:
1, Service as a function; Reactive programming:
2, function is in line with the functional Microservices need to consider their
programming paradigm: transparent
responsiveness, ie
reference, no side effects, can be combined,
1. Resilience (in response to failure);
can be transformed, etc.;
2, scalability (response under different load
3, the return value of the function is unified
conditions)
Fututre [Xxx] / Try [Xxx] / Option [Xxx]. Try
3, message-driven (loosely coupled, through
and so is a Monad Tip: Refer to the basic
concept of Monad in functional asynchronous message isolation) and
About author:
• Github: https://github.com/lovepoem
• twitter: wangxinvictor
Community:
• dubbo.apache.org
• dubbo.io
Repos:
• github.com/apache/incubator-dubbo
• github.com/dubbo
Email list
• [email protected]