swift/doc/source
Kota Tsuyuzaki 40ba7f6172 EC Fragment Duplication - Foundational Global EC Cluster Support
This patch enables efficent PUT/GET for global distributed cluster[1].

Problem:
Erasure coding has the capability to decrease the amout of actual stored
data less then replicated model. For example, ec_k=6, ec_m=3 parameter
can be 1.5x of the original data which is smaller than 3x replicated.
However, unlike replication, erasure coding requires availability of at
least some ec_k fragments of the total ec_k + ec_m fragments to service
read (e.g. 6 of 9 in the case above). As such, if we stored the
EC object into a swift cluster on 2 geographically distributed data
centers which have the same volume of disks, it is likely the fragments
will be stored evenly (about 4 and 5) so we still need to access a
faraway data center to decode the original object. In addition, if one
of the data centers was lost in a disaster, the stored objects will be
lost forever, and we have to cry a lot. To ensure highly durable
storage, you would think of making *more* parity fragments (e.g.
ec_k=6, ec_m=10), unfortunately this causes *significant* performance
degradation due to the cost of mathmetical caluculation for erasure
coding encode/decode.

How this resolves the problem:
EC Fragment Duplication extends on the initial solution to add *more*
fragments from which to rebuild an object similar to the solution
described above. The difference is making *copies* of encoded fragments.
With experimental results[1][2], employing small ec_k and ec_m shows
enough performance to store/retrieve objects.

On PUT:

- Encode incomming object with small ec_k and ec_m  <- faster!
- Make duplicated copies of the encoded fragments. The # of copies
  are determined by 'ec_duplication_factor' in swift.conf
- Store all fragments in Swift Global EC Cluster

The duplicated fragments increase pressure on existing requirements
when decoding objects in service to a read request.  All fragments are
stored with their X-Object-Sysmeta-Ec-Frag-Index.  In this change, the
X-Object-Sysmeta-Ec-Frag-Index represents the actual fragment index
encoded by PyECLib, there *will* be duplicates.  Anytime we must decode
the original object data, we must only consider the ec_k fragments as
unique according to their X-Object-Sysmeta-Ec-Frag-Index.  On decode no
duplicate X-Object-Sysmeta-Ec-Frag-Index may be used when decoding an
object, duplicate X-Object-Sysmeta-Ec-Frag-Index should be expected and
avoided if possible.

On GET:

This patch inclues following changes:
- Change GET Path to sort primary nodes grouping as subsets, so that
  each subset will includes unique fragments
- Change Reconstructor to be more aware of possibly duplicate fragments

For example, with this change, a policy could be configured such that

swift.conf:
ec_num_data_fragments = 2
ec_num_parity_fragments = 1
ec_duplication_factor = 2
(object ring must have 6 replicas)

At Object-Server:
node index (from object ring):  0 1 2 3 4 5 <- keep node index for
                                               reconstruct decision
X-Object-Sysmeta-Ec-Frag-Index: 0 1 2 0 1 2 <- each object keeps actual
                                               fragment index for
                                               backend (PyEClib)

Additional improvements to Global EC Cluster Support will require
features such as Composite Rings, and more efficient fragment
rebalance/reconstruction.

1: http://goo.gl/IYiNPk (Swift Design Spec Repository)
2: http://goo.gl/frgj6w (Slide Share for OpenStack Summit Tokyo)

Doc-Impact

Co-Authored-By: Clay Gerrard <clay.gerrard@gmail.com>
Change-Id: Idd155401982a2c48110c30b480966a863f6bd305
2017-02-22 10:56:13 -08:00
..
api Typo fix: curent => current 2017-02-07 13:36:50 +07:00
images Remove execute permissions from doc files and swift.conf-sample 2016-02-18 08:52:03 +00:00
ops_runbook Removed redundant 'is' 2017-01-16 15:16:37 +07:00
account.rst Alphabetized items under other sections in source documentation 2014-02-21 10:59:29 -07:00
admin_guide.rst Merge "Add missing expirer recon metric to admin_guide" 2016-12-01 17:52:27 +00:00
apache_deployment_guide.rst change default ports for servers 2016-04-29 14:47:38 -04:00
associated_projects.rst Multi Swift - Multiple Swift clusters on same h/w 2016-11-04 14:17:32 +00:00
conf.py Fix doc build if git is absent 2016-04-28 10:12:25 -05:00
container.rst Add Storage Policy Documentation 2014-06-19 10:18:34 -07:00
cors.rst Add X-Openstack-Request-Id to Access-Control-Expose-Headers 2016-11-16 12:39:12 -08:00
crossdomain.rst Fix misspellings in swift 2014-02-20 16:15:48 +08:00
db.rst Initial commit of Swift code 2010-07-12 17:03:45 -05:00
deployment_guide.rst Merge "Default object_post_as_copy to False" 2017-01-24 20:58:34 +00:00
development_auth.rst Merge "Fix incorrect kwarg in auth middleware example" 2015-12-18 22:04:47 +00:00
development_guidelines.rst Bring docs inline with changes to tox envs 2017-01-25 17:29:56 +00:00
development_middleware.rst Merge "Revises 'url' to 'URL' and 'json' to 'JSON'" 2016-10-06 00:23:41 +00:00
development_ondisk_backends.rst Fix six typos on swift documentation 2015-07-24 17:11:49 +09:00
development_saio.rst Fix_typo: "subsitute" -> "substitute" 2017-02-07 15:09:41 +07:00
first_contribution_swift.rst Hyperlink fix to first contribution doc 2015-10-16 19:34:44 +05:30
getting_started.rst List system dependencies for running common tests 2016-05-12 08:51:31 +02:00
howto_installmultinode.rst Remove broken links 2017-01-16 11:22:08 +01:00
index.rst Document access control lists (ACLs) 2016-11-08 14:17:24 +00:00
logs.rst Refactor server side copy as middleware 2016-05-11 14:55:51 -04:00
middleware.rst Add encrypter and decrypter links to middleware.rst 2016-07-08 11:50:55 +01:00
misc.rst Add Storage Policy Documentation 2014-06-19 10:18:34 -07:00
object.rst Alphabetized items under other sections in source documentation 2014-02-21 10:59:29 -07:00
overview_acl.rst Document access control lists (ACLs) 2016-11-08 14:17:24 +00:00
overview_architecture.rst Add links for more detailed overview in overview_architecture 2016-10-23 12:13:57 +00:00
overview_auth.rst Add note that tempauth is not intended for production 2016-11-23 12:00:19 +00:00
overview_backing_store.rst Use uppercase 'S' in word "OpenStack" 2016-02-04 16:48:13 +05:30
overview_container_sync.rst Make container sync copy SLO manifests 2016-09-14 13:32:00 +01:00
overview_encryption.rst Add encrypter and decrypter links to middleware.rst 2016-07-08 11:50:55 +01:00
overview_erasure_code.rst EC Fragment Duplication - Foundational Global EC Cluster Support 2017-02-22 10:56:13 -08:00
overview_expiring_objects.rst line wrap overview_expiring_objects.rst 2016-12-08 16:55:41 +00:00
overview_global_cluster.rst Add Pros/Cons docs for global cluster consideration 2016-08-17 12:52:25 +01:00
overview_large_objects.rst Allow DLO manifest to be updated when using post-as-copy 2016-08-21 00:09:09 -05:00
overview_object_versioning.rst versioned writes middleware 2015-08-07 14:11:32 -04:00
overview_policies.rst Fixed inconsistent naming conventions 2016-07-07 21:40:21 +00:00
overview_reaper.rst Fixed inconsistent naming conventions 2016-07-07 21:40:21 +00:00
overview_replication.rst Fixed inconsistent naming conventions 2016-07-07 21:40:21 +00:00
overview_ring.rst Grammer error : swift/doc/source/overview_ring.rst 2016-08-11 16:10:35 +00:00
policies_saio.rst Mirror X-Trans-Id to X-Openstack-Request-Id 2016-10-30 20:02:39 -07:00
proxy.rst Alphabetized items under other sections in source documentation 2014-02-21 10:59:29 -07:00
ratelimit.rst Fixed inconsistent naming conventions 2016-07-07 21:40:21 +00:00
replication_network.rst Allows to configure the rsync modules where the replicators will send data 2015-09-07 08:00:18 +02:00
ring_background.rst resurrect gholt blog posts on building consistent hashing ring 2016-05-10 15:41:27 -07:00
ring.rst Initial commit of Swift code 2010-07-12 17:03:45 -05:00
test-cors.html move cors-test-page to literal include 2014-03-17 21:09:22 -07:00