Chinaunix首页 | 论坛 | 博客
  • 博客访问: 6942062
  • 博文数量: 701
  • 博客积分: 10821
  • 博客等级: 上将
  • 技术积分: 12021
  • 用 户 组: 普通用户
  • 注册时间: 2005-12-02 10:41
个人简介

中科院架构师,专注企业数字化各个方面,MES/ERP/CRM/OA、物联网、传感器、大数据、ML、AI、云计算openstack、Linux、SpringCloud。

文章分类

全部博文(701)

分类: 云计算

2015-02-27 11:09:04

以下是:
介绍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对请求做相应的处理 然后返回。

时间比较仓促,还有一些不对的地方。(针对juno4debian)未完待续...

阅读(3468) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~