镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

XDRIVE: Add S3 storage backend - #7231

Open
Katze-942 wants to merge 1 commit into
XTLS:mainfrom
Katze-942:xdrive-s3
Open

Katze-942 wants to merge 1 commit into
XTLS:mainfrom
Katze-942:xdrive-s3

Conversation

@Katze-942

Copy link
Copy Markdown
Contributor

Adds an s3 backend to XDRIVE for transferring data through S3-compatible storage. Requests are signed using AWS Signature V4. The implementation is based on the existing drive.go, so there may be some code duplication.
Tested with Yandex Cloud and VK Cloud S3 storage. Example configuration:

"xdriveSettings": {
  "service": "s3",
  "remoteFolder": "xdrive",
  "secrets": [
    "ACCESS_KEY_ID",
    "SECRET_ACCESS_KEY"
  ],
  "s3": {
    "endpoint": "https://storage.yandexcloud.net",
    "region": "ru-central1",
    "bucket": "example-bucket",
    "pathStyle": true
  }
}

remoteFolder sets the object prefix within the bucket.

pathStyle is enabled by default and adds the bucket name to the URL path. When set to false, the bucket name is added to the hostname instead.

@FunLay123

Copy link
Copy Markdown
Contributor

Would be so interesting to watch speed results 👀

@Katze-942

Copy link
Copy Markdown
Contributor Author

Would be so interesting to watch speed results 👀

Yandex Cloud was the most stable. Telegram stayed connected, messages were delivered quickly, and media loaded without issues. Speedtest showed speeds of up to 40 Mbps. Speed tests against my own server averaged 20-30 Mbps.

VK Cloud sometimes worked very reliably without reconnecting, but at other times it became very slow to process requests. During quieter periods, download speeds were around 5-9 Mbps, with upload speeds of about 2-3 Mbps.

@FunLay123

Copy link
Copy Markdown
Contributor

@Katze-942 А что насчёт цены? Видел там в яндексе вроде 100 гигов бесплатно, но дорогой листинг, а вк подешевле, но нету бесплатных гб.

What about the cost?

@Katze-942

Copy link
Copy Markdown
Contributor Author

@Katze-942 А что насчёт цены? Видел там в яндексе вроде 100 гигов бесплатно, но дорогой листинг, а вк подешевле, но нету бесплатных гб.

What about the cost?

Да, там 100 гигов бесплатно. DELETE бесплатен. Остальное тарифицируется как:

  • PUT/LIST: 0,57 ₽ за 1 000 операций
  • GET: 0,46₽ за 10 000 операций
  • Если больше 100 гб исходящего трафика, то 1,67994 ₽ рублей за ГБ (до терабайта. Если больше терабайта, то цена чуть ниже)

У VK Cloud где-то цены пишут, но я запутался в их кабинете. Как я понял, там 2,28 ₽/ГБ хранения в месяц и 1,31 ₽/ГБ исходящего трафика.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants