0% found this document useful (0 votes)
29 views

Dubbo and Weidian's Practice On Microservice Architecture en

Uploaded by

songdao1983
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views

Dubbo and Weidian's Practice On Microservice Architecture en

Uploaded by

songdao1983
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

Dubbo and Weidian's Practice on Microservice

Architecture
Speaker:Xin Wang

Who's Weidian
CONTENTS
The stages of Weidian

Challenges & Solutions

About the future


Who's Weidian ?
Weidian is a app of China to help sellers open their shop on mobile phones. Anyone can
open their own shop through mobile phone numbers.

Scale Security Cost Efficienc


70 million 600 million / Tens of y
day millions / year 600+

• 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

Challenges & Solutions

About the future


Monolithic application stage
WEB OPEN-API
Technology stack
l PHP
API API API l Nginx
l Mysql
App server Shop payment
Shop league l Redis

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

Challenges & Solutions

About the future


Servitization-Module split

How to split the module?


• Consider the business first VS
Consider the data table first?
• Should the number of lines of code
be used as the basis for
subcontracting?
Complex business relations
• How to balance the pursuit of design,
engineering, and operation?
Servitization-Module split

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

Services, the configuration workload is getting bigger, how to ensure


that no mistakes are made?

How to ensure that the test system is independent according to


Ops and business needs?
deployment
How to implement the CI/CD pipeline system?
problem
How do you fully squeeze the usage of the infrastructure
(CPU/memory/disk/network)?
Servitization-Automated deployment
OPS
l OS version
•Centos7.2

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

Kafka/flink vdian htt


VDDS redis …..
MQ p

l Dapper: rpc tracks the basis of the paper


l Rpc framework generation, no business intrusion
l Trace Id: initial call to generate uuid string
l Each rpc call generates a span while recording the parent span
l Full support for other middleware:tomcat/dubbo/vdianMQ/vdds/redisClient
Servitization-Application service monitoring, alarm
Calculation rule
configuration file
l Application service monitoring,
Regular update
alarm
Kakfa Time window
filter Persistence • Vmonitor agent collects rpc trace
stream Summary
Storm calculation engine logs

write • Alarm rule configuration (traffic


Timing script
calculation to exception/service exception
Alarm rule 1- 2- HBAS
determine whether Read
configuration Read
the alarm condition is ing
E super threshold...)
alarm
file config
met data
3-
output
l Solved problems:
SMS • Abnormal traffic warning
alarm
Alarm center • Error warning
Servitization-Application fuse, limit flow
l Solved problems:
• Edge service dragged core service at
Service governance
high traffic
platform
• Limit when large flow

Dubbo Consumer Filter Chain Dubbo Provider Filter Chain

Request processing Service Request processing Service


Business Business
thread pool … governance thread pool … governance
logic logic
(Dubbo,Tomcat) filter (Dubbo,Tomcat) filter

Fuse,downgrade,isolate
Limit flow
Service governance client

Core: Hystrix
Servitization-Business challenge: double alive

l Requirement: Computer room


migration(Double alive in the same city)

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

Summary: using Dubbo to do service management,


we should make efforts in all around Dubbo
Dubbo and Weidian's Practice on Microservice
Architecture
Speaker:Xin Wang

Who's Weidian
CONTENTS
The stages of Weidian

Challenges & Solutions

About the future


About the future-Giving back to the community

Private dubbo version,


how to integrate with the
official version of dubbo?
• Please submit your private extension to
How to replace the dubbo the dubbo communitydubbo
version of the private
maintenance with the latest
DUBBO • Dubbo official will make the best

practices in the following areas:


dubbo version?
• Serialization compatibility (in the rolling upgrade,
rpc tracking, current-limiting fuse,

the business is guaranteed to be ordered) multi-language support, etc.

• After graduating from the apache community, the

package will be changed from com.alibaba.dubbo to

org.apache.dubbo and will provide an extension.


About the future-Multi-language support
Service Mesh’s
Control Plane

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

No need to implement a dubbo client in every language


(in multi-language communication, thrift, gRPC and other
serialization frameworks based on tcp protocol will
perform better than http1+json) serialization

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

Service A SideCar SideCar Service B

Business Circuit Circuit Business


Logic Breaker Breaker Logic
Service Service
Discovery Discovery

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

programming; responsive programming requirements:


4. Based on the above three points, the message-driven, designed for failure,
whole system can be constructed like asynchronous. Therefore, responsive
building blocks; programming is required;
Contact us

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]

You might also like