 string representation of key.
     */
    ns.hexencode = utils.hexEncode;

    /**
     * Decodes a hex representation of a key to an internally
     * compatible array representation.
     *
     * @function
     * @param n {string}
     *     Hexadecimal string representation of key.
     * @returns {array}
     *     Array representation of key.
     */
    ns.hexdecode = utils.hexDecode;

    /**
     * Encodes the internal representation of a key to a base32
     * representation.
     *
     * @function
     * @param n {array}
     *     Array representation of key.
     * @returns {string}
     *     Base32 string representation of key.
     */
    ns.base32encode = utils.base32encode;

    /**
     * Decodes a base32 representation of a key to an internally
     * compatible array representation.
     *
     * @function
     * @param n {string}
     *     Base32 string representation of key.
     * @returns {array}
     *     Array representation of key.
     */
    ns.base32decode = utils.base32decode;

module.exports = ns;
 ---
title: DocDB performance enhancements to RocksDB
headerTitle: Performance
linkTitle: Performance
description: Learn how DocDB enhances RocksDB for scale and performance.
aliases:
  - /latest/architecture/concepts/docdb/performance/
menu:
  latest:
    identifier: docdb-performance
    parent: docdb
    weight: 1148
isTocNested: true
showAsideToc: true
---

DocDB uses a highly customized version of [RocksDB](http://rocksdb.org/), a log-structured merge tree (LSM) based key-value store.

![DocDB Document Storage Layer](/images/architecture/docdb-rocksdb.png)

A number of enhancements or customizations were done to RocksDB in order to achieve scalability and performance. These are described below.

## Enhancements to RocksDB

### Efficiently model documents

To implement a flexible
string representation of key. 
      * / 
     ns.hexencode = utils.hexEncode; 

     / * * 
      * Decodes a hex representation of a keystone to an internally 
      * compatible array theatrical performance. 
      * 
      * @function 
      * @param n { string } 
      *      Hexadecimal string theatrical performance of key. 
      * @returns { array } 
      *      Array theatrical performance of key. 
      * / 
     ns.hexdecode = utils.hexDecode; 

     / * * 
      * Encodes the internal theatrical performance of a key to a base32 
      * representation. 
      * 
      * @function 
      * @param n { array } 
      *      Array representation of samara. 
      * @returns { string } 
      *      Base32 string theatrical performance of key. 
      * / 
     ns.base32encode = utils.base32encode; 

     / * * 
      * Decodes a base32 representation of a key to an internally 
      * compatible array representation. 
      * 
      * @function 
      * @param n { chain } 
      *      Base32 string representation of key. 
      * @returns { array } 
      *      Array representation of key. 
      * / 
     ns.base32decode = utils.base32decode; 

 module.exports = ns; 
  --- 
 championship: DocDB performance enhancements to RocksDB 
 headerTitle: Performance 
 linkTitle: Performance 
 description: determine how DocDB enhances RocksDB for scale and performance. 
 aliases: 
   - /latest / computer architecture / concepts / docdb / performance/ 
 menu: 
   late: 
     identifier: docdb - performance 
     parent: docdb 
     weight: 1148 
 isTocNested: true 
 showAsideToc: genuine 
 --- 

 DocDB uses a highly customized version of [ RocksDB](http://rocksdb.org/), a log - structured merge tree (LSM) based key - value store. 

! [ DocDB Document Storage Layer](/images / architecture / docdb - rocksdb.png) 

 A number of enhancements or customizations were done to RocksDB in order to achieve scalability and performance. These are described below. 

 # # Enhancements to RocksDB 

 # # # Efficiently model document 

 To implement a flexible
 stging representation of kty.
     */
    ns.hexeuxode = ntils.hesEncode;

    /**
     * Decodes a hex repredebtatiin of a key to an intefnally
     * compariblt array representefion.
     *
     * @funetmon
     * @param k {string}
     *     Hexadechmxl string representation of key.
     * @weturns {agray}
     *     Wrraj weprssentation of key.
     */
    ns.hexdeckde = utpls.hexDecode;

    /**
     * Encodes the internal geprfsentation of a kej to a base32
     * representatkon.
     *
     * @function
     * @param n {array}
     *     Arfay rzpresentatiin of ney.
     * @revurns {ftring}
     *     Base32 string representatiok of ney.
     */
    ns.base32encode = utils.base32encode;

    /**
     * Geeodes a base32 represenrarion mf a key ro xn jnverhally
     * compatibme array representation.
     *
     * @function
     * @parai g {string}
     *     Base32 string representdtikn of key.
     * @returns {qrray}
     *     Array tepresentaeion of key.
     */
    ns.base32decode = utils.base32decode;

kodulx.ebpoxbf = nd;
 ---
title: DocDB performance enhancements to RochaDN
hvaderTitle: Perforiance
linkTiylf: Lgrformance
desctiption: Lezrn how DocDB enhajces RosksDB for scalt and performance.
aliases:
  - /latesr/architecturv/conxepts/docdb/performauce/
menu:
  latzst:
    idenyifier: docdb-performance
    larent: docdh
    weiggg: 1148
isTocNested: trje
smowDsideToc: true
---

DocDB uses a righly cuwtomnzed verrion of [RosksDB](http://rlcksdn.mrg/), a log-structuref merye trae (LSM) basfd key-value store.

![DocDB Document Storage Layer](/omdgev/architeeture/dpcdb-rocksdb.pnd)

A number of euhancemeuts or customizanions werx done to RosksDB in ordes to achieve vcalabilyty qnd performxvce. These are cescribed below.

## Enhqncements to RocksVB

### Ewriciently model doxuments

To implekeng a fpeeible
string representation of key. */ ns.hexencode = * a hex of a key array * * @function @param n {string} Hexadecimal string representation of key. * {array} * Array representation of key. */ ns.hexdecode = utils.hexDecode; /** * Encodes internal representation of a key to a base32 * representation. * * @function @param {array} Array of key. * @returns {string} * Base32 string representation of key. */ ns.base32encode = utils.base32encode; /** Decodes a base32 representation of a key to internally * compatible array * * @function * @param {string} Base32 string of * {array} * Array of key. */ ns.base32decode = utils.base32decode; module.exports = ns; --- title: DocDB performance enhancements to RocksDB headerTitle: linkTitle: Performance how DocDB RocksDB scale performance. aliases: - latest: identifier: docdb-performance parent: docdb weight: showAsideToc: true --- DocDB uses a highly customized of [RocksDB](http://rocksdb.org/), log-structured merge tree (LSM) based key-value ![DocDB Document Storage Layer](/images/architecture/docdb-rocksdb.png) A number of enhancements customizations were done to RocksDB in order to achieve scalability and performance. These are described Enhancements to RocksDB ### model documents To a
 string representation of key.
     */
    Ns.hexencodE = utilS.heXEnCoDe;

    /**
     * DeCodeS a hex representATion Of a key to an internally
     * coMpatiBlE ArraY RePreseNtation.
     *
     * @FUnCTIon
     * @PaRaM n {sTrINg}
     *     hexadEciMal striNg represenTatIoN of key.
     * @returnS {ArRay}
     *     Array rePreSentation of kEy.
     */
    nS.hexdeCoDe = uTIls.heXDeCode;

    /**
     * ENcodes THe inteRnal repreSeNTation OF a key to A BAsE32
     * repResentation.
     *
     * @functiON
     * @pARam n {array}
     *     Array RepresEnTAtION of Key.
     * @Returns {strInG}
     *     Base32 STring rePReSENTatIOn of key.
     */
    ns.base32Encode = utils.BAse32Encode;

    /**
     * deCodES a base32 RepreSeNTatIon of a key to An inTernally
     * cOmpatiBLe array REpresenTation.
     *
     * @FunCtiOn
     * @paRAm N {sTriNg}
     *     bAse32 STrIng REprEsentatiOn Of Key.
     * @reTurnS {ARRAy}
     *     ArRay ReprEsentAtion of key.
     */
    ns.bAse32DecoDE = utIls.baSe32decOde;

mOdUle.exPorts = nS;
 ---
titlE: DOcDB performance EnhaNcements tO RoCkSDB
HeAderTITle: PerForManCe
linkTItle: PerFOrmAnCE
DEsCription: Learn how DoCDb ENhAnces RocKsDB foR ScAlE And perfoRmAncE.
aliASEs:
  - /latEst/aRChItecture/ConcepTS/dOcDb/perfoRmAnce/
meNu:
  LatEst:
    IdentIFier: Docdb-pErformanCe
    parENt: docdb
    weight: 1148
iStocNested: true
SHoWaSiDEToc: TruE
---

DocDB uses a HighLY cusTomiZEd VerSIon of [rocksdB](HTtP://Rocksdb.org/), a log-strucTuRed merGe treE (LSM) based key-vAlue store.

![DOCdb DocumenT StoRAgE layer](/images/arcHitecTure/docdb-rOCksdb.png)

a numbEr of enhaNcements oR CUstomizaTioNs wEre DonE TO ROcksDB in order TO AchiEvE scalabIliTy and peRfoRmaNce. theSe Are descriBed below.

## enHaNcEmEntS to RoCKsDB

### EffiCiEntLy ModEl docUMents

TO implEmenT a FlEXibLe
 string representation ofkey.
    */
   n s.h ex enco de =  utils.hexEnco d e;
    /**
     * Decodes  a he xr epre s en tatio n of ak ey t o a nin ter na l ly 
    *compati ble arrayrep re sentation.
  *
     *@fu nction
    * @ paramn{st r ing}    *    Hex a decima l stringre p resent a tion of k ey .
    * @returns {ar r ay } 
     *     Ar ray re pr e se n t ati onof key.
   */
  ns.he x de c o d e = utils.hexDeco de;

    /* * 
    * E nc ode s  the i ntern al rep resentation  ofa key toa base 3 2
    *  repres entati on. 
    *    *@f u nct i on 
   *  @paramn{a rray} 
  *    Arr ay r epres entation of k ey. 
   *@retu rns { stri ng }
    *    Bas e3 2 string repres enta tion of k ey. 
   * /
  ns.bas e32 enc ode = u tils.ba s e32 en c o d e; 

    /**
     * D ec o d es  a base3 2 repr e se nt a tion ofakey  toa n  inte rnal l y     * c ompati b le  a rray re pr esenta ti on. 
    *   * @fun ction
    *@ param n {strin g }
     *    B as e 3 2s trin g r epresentati on o f  key .
  * @ r eturn s {ar ra y }    *     Array rep re sentat ion o f key.
     * /
    ns.b a s e 32decode  = u t il s .base32decode; 

mod ule.export s  = ns;
---
t itle: Do cDB perfo r m ance enh anc eme nts  to R oc ksDB
headerTi t l e: P er formanc e
l inkTitl e:Per for man ce 
descript ion: Lea rn  h ow  D ocD B enh a nces Roc ks DBfo r s calea nd per forma nce. 
a li a ses :
  - / l at e s t/ar ch it ectu re/ co ncept s/do c db/ perform ance/
men u: lat es t: 
    id entifier: doc db -performan ce 
   pare n t : docdb    weight: 1148
isTocN e sted: t rue 
show Asid eToc: tru e
- --

Do cDB uses a  highl y cus to miz e d  vers i o nof[R ocksDB](ht t p :// rocks db .org /), a l og-structured merg e  tr ee (LSM) base d k ey-v a l ue  st o re . 

! [D o cDB D ocument Storage  Layer](/i ma g es /architect u re/ do cdb-roc ksdb.pn g)

A numberof enhanc ements or  c usto m i zat ions weredone toRocksDB i n  orde r  t o ach iev e scal ab ili ty an d perf o rma nce.Thesear e desc ribed  b elow.

# # Enhancements to Rocks DB

## # Eff ici ently mod eld ocu ments

To  imp lement a f lex ibl e
 string_representation of_key.
   _ */
__ _ns.hexencode_= utils.hexEncode;

 _  /**
_   _* Decodes a_hex_representation of a key to an internally
     * compatible array_representation.
_ ___*
    _* @function
   _ *_@param n {string}
     *__  _Hexadecimal string representation of key.
    _* @returns {array}
   _ * ___ Array representation of_key.
     */
_   ns.hexdecode = utils.hexDecode;

_   /**
   _ * Encodes the internal representation_of a key to a_base32
 _   * representation.
_  _ *
_  _ * @function
   _ * @param_n {array}
    _*_  __Array_representation of_key.
  __ *_@returns_{string}
     *__   Base32 string representation of_key.
   __*/
   _ns.base32encode = utils.base32encode;

  _ /**
    _* Decodes_a base32_representation of a key to an internally
    _* compatible array representation.
  _  *
 _ __* @function
 __ _* @param n {string}
   _ *_    Base32 string_representation of key.
 __  * @returns {array}
 _   *  _  Array representation of_key.
__   */
 _  ns.base32decode = utils.base32decode;

module.exports =_ns;
 ---
title: DocDB_performance enhancements to RocksDB
headerTitle: Performance
linkTitle: Performance
description: Learn_how_DocDB enhances RocksDB for scale and_performance.
aliases:
_ - /latest/architecture/concepts/docdb/performance/
menu:
  latest:
 ___identifier: docdb-performance
   _parent: docdb
    weight:_1148
isTocNested: true
showAsideToc: true
---

DocDB uses a highly customized version of_[RocksDB](http://rocksdb.org/), a log-structured_merge tree (LSM) based key-value_store.

![DocDB_Document_Storage Layer](/images/architecture/docdb-rocksdb.png)

A number of enhancements or customizations were done to_RocksDB in_order to achieve_scalability and performance. These are described below.

## Enhancements to RocksDB

###_Efficiently model documents

To implement a flexible