Swift 中proxy-server.conf启动顺序总结

    昨天介绍swift服务启动架构的时候,谈到了proxy启动的时候,根据proxy-server.conf配置文件依次启动服务,下面来看一下我的proxy-server.conf文件

[DEFAULT]
bind_port = 8080
bind_ip = 192.168.4.87
user = swift
log_level = DEBUG
log_facility = LOG_LOCAL3

[pipeline:main]
pipeline = healthcheck cache authtoken keystone proxy-server

[app:proxy-server]
use = egg:swift#proxy
all_account_management = true
account_autocreate = true

[filter:keystone]
paste.filter_factory = keystone.middleware.swift_auth:filter_factory
operator_roles = admin, swiftoperator

[filter:authtoken]
paste.filter_factory = keystone.middleware.auth_token:filter_factory
delay_auth_decision =1
auth_port = 35357
auth_host = 192.168.4.87
auth_protocol = http
admin_token = zhoubing

[filter:healthcheck]
use = egg:swift#healthcheck

[filter:cache]
use = egg:swift#memcache
memcache_servers = 192.168.4.87:11211

其服务启动顺序 会根据 pipeline 逆序启动,但是当请求来的时候,会调用按照顺序调用filter,例如:

pipeline = filter1 filter2 filter2 myapp

这样会先调用 filter1.__call__(env, start_response)然后是filter2._call__(env, start_response),依次下去最后是myapp.__call__(env,start_response)。 对于Swift来说,主要的流程在于请求来了->auth_token->swift_auth->handle_request,其中每个filter对请求做相应的处理 然后返回。

转载于:https://my.oschina.net/zhouxingxing/blog/82134

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值