Table Of Contents

Previous topic

Partitioned Consistent Hash Ring

Next topic

Account

This Page

Proxy

Proxy Server

class swift.proxy.server.Application(conf, memcache=None, logger=None, account_ring=None, container_ring=None, object_ring=None)

Bases: object

WSGI application for the proxy server.

get_controller(path)

Get the controller to handle a request.

Parameters:path – path from request
Returns:tuple of (controller class, path dictionary)
Raises :ValueError (thrown by split_path) if given invalid path
handle_request(req)

Entry point for proxy server. Should return a WSGI-style callable (such as swob.Response).

Parameters:req – swob.Request object
set_node_timing(node, timing)
sort_nodes(nodes)

Sorts nodes in-place (and returns the sorted list) according to the configured strategy. The default “sorting” is to randomly shuffle the nodes. If the “timing” strategy is chosen, the nodes are sorted according to the stored timing data.

update_request(req)
swift.proxy.server.app_factory(global_conf, **local_conf)

paste.deploy app factory for creating WSGI proxy apps.