MCPcopy Index your code
hub / github.com/DarLiner/Dragonfly

github.com/DarLiner/Dragonfly @v0.1.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.1.1 ↗ · + Follow
707 symbols 1,873 edges 118 files 81 documented · 11% updated 8y ago★ 108
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Dragonfly

Join the chat at https://gitter.im/alibaba/Dragonfly License FOSSA Status Build Status

Dragonfly

Contents

Introduction

Dragonfly is an intelligent P2P based file distribution system. It resolved issues like low-efficiency,low-success rate,waste of network bandwidth you faced in large-scale file distribution scenarios such as application deployment, large-scale cache file distribution, data file distribution, images distribution etc. In Alibaba, the system transferred 2 billion times and distributed 3.4PB data every month, it becomes one of the most important infrastructure in Alibaba. The reliability is up to 99.9999%.

DevOps takes a lot of benefits from container technologies . but at the same time, it also bring a lot of challenges: the efficiency of image distribution, especially when you have a lot of applications and require image distribution at the same time. Dragonfly works extremely well with both Docker and Pouch, and actually we compatible with any other container technologies without any modifications of container engine.

It delivers up to 57 times the throughput of native docker and saved up to 99.5% the out bandwidth of registry.

Dragonfly makes it simple and cost-effective to set up, operate, and scale your any kind of files/images/data distribution.

Features

The project is an open source version of the dragonfly and more internal features will be gradually opened.

  • P2P based file distribution: Using P2P technology for file transmission, which can make full use of the bandwidth resources of each peer to improve download efficiency. saved lot of cross-IDC bandwidth, especially costly cross-board bandwidth
  • Non-invasive support all kinds of container technologies: Dragonfly can seamlessly support various containers for distributing images.
  • Host level speed limit: Many download tools(wget/curl) only have rate limit for the current download task,but dragonfly still provides rate limit for the entire host.
  • Passive CDN: The CDN mechanism can avoid repetitive remote downloads.
  • Strong consistency: Dragonfly can guarantee that all downloaded files must be consistent even if users do not provide any check code(MD5).
  • Disk protection and high efficient IO: Pre check Disk space, delay synchronization, write file-block in the best order, split net-read / disk-write, and so on.
  • High performance: Cluster Manager is completely closed-loop.that is, it does not rely on any DB and distributed cache, processing requests with extremely high performance.
  • Exception auto isolation: Dragonfly will automatically isolate exception nodes(peer or Cluster Manager) to improve download stability.
  • No pressure on file source: Generally, as long as a few Cluster Managers download file from the source.
  • Support standard http header: Support http header, Submit authentication information through http header.
  • Effective concurrency control of Registry Auth: Reduce the pressure of the Registry Auth Service.
  • Simple and easy to use: Very few configurations are needed.

Comparison

Test Environment
Dragonfly server 2 * (24core 64GB 2000Mb/s)
File Source server 2 * (24core 64GB 2000Mb/s)
Client 4core 8GB 200Mb/s
Target file size 200MB
Executed Date 2016-04-20

For Dragonfly the average time of downloading is around 12 seconds no matter how many clients issued the file downloading. and for wget time increased when you have more clients. and by 1200 clients, the file source crash, it can not serve any client.

License

Dragonfly is available under the Apache 2.0 License.

Commercial Support

If you need commercial support of Dragonfly, please contact us for more information: 云效.

Dragonfly is already integrated with AliCloud Container Services If you need commercial support of AliCloud Container Service, please contact us for more information: Container Service

Extension points exported contracts — how you extend this code

PeerService (Interface)
(no doc) [7 implementers]
src/supernode/src/main/java/com/alibaba/dragonfly/supernode/service/PeerService.java
Downloader (Interface)
(no doc) [1 implementers]
src/daemon/src/df-daemon/handler/dfgetter.go
Recyclable (Interface)
(no doc) [8 implementers]
src/supernode/src/main/java/com/alibaba/dragonfly/supernode/common/domain/gc/Recyclable.java
TaskService (Interface)
(no doc) [2 implementers]
src/supernode/src/main/java/com/alibaba/dragonfly/supernode/service/TaskService.java
PeerTaskService (Interface)
(no doc) [2 implementers]
src/supernode/src/main/java/com/alibaba/dragonfly/supernode/service/PeerTaskService.java
PeerRegistryService (Interface)
(no doc) [2 implementers]
src/supernode/src/main/java/com/alibaba/dragonfly/supernode/service/PeerRegistryService.java

Core symbols most depended-on inside this repo

get
called by 68
src/supernode/src/main/java/com/alibaba/dragonfly/supernode/service/TaskService.java
getTaskId
called by 29
src/supernode/src/main/java/com/alibaba/dragonfly/supernode/common/domain/Task.java
equals
called by 29
src/supernode/src/main/java/com/alibaba/dragonfly/supernode/common/domain/Task.java
add
called by 28
src/supernode/src/main/java/com/alibaba/dragonfly/supernode/service/TaskService.java
remove
called by 24
src/supernode/src/main/java/com/alibaba/dragonfly/supernode/repository/TaskRepository.java
read
called by 22
src/getter/core/server.py
close
called by 19
src/getter/component/httputil.py
unlock
called by 18
src/supernode/src/main/java/com/alibaba/dragonfly/supernode/service/lock/LockService.java

Shape

Method 531
Class 93
Function 60
Interface 13
Enum 6
Struct 4

Languages

Java77%
Python19%
Go5%

Modules by API surface

src/supernode/src/main/java/com/alibaba/dragonfly/supernode/common/domain/Task.java41 symbols
src/getter/core/server.py31 symbols
src/getter/core/fetcher.py30 symbols
src/supernode/src/main/java/com/alibaba/dragonfly/supernode/repository/ProgressRepository.java29 symbols
src/supernode/src/main/java/com/alibaba/dragonfly/supernode/common/domain/FileMetaData.java27 symbols
src/supernode/src/main/java/com/alibaba/dragonfly/supernode/common/view/PieceTask.java19 symbols
src/supernode/src/main/java/com/alibaba/dragonfly/supernode/service/cdn/ProtocolContent.java17 symbols
src/supernode/src/main/java/com/alibaba/dragonfly/supernode/service/impl/ProgressServiceImpl.java16 symbols
src/getter/exception.py16 symbols
src/supernode/src/main/java/com/alibaba/dragonfly/supernode/service/timer/DownSpaceCleaner.java15 symbols
src/supernode/src/main/java/com/alibaba/dragonfly/supernode/service/lock/LockService.java15 symbols
src/supernode/src/main/java/com/alibaba/dragonfly/supernode/common/view/ResultInfo.java15 symbols

For agents

$ claude mcp add Dragonfly \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page