
![](images/architecture.png)

## Multi-Datacenter Architecture

KUDO Cassandra can span a ring across multiple kubernetes clusters, to
facilitate the deployment across various regions and zones. Read more about
multidataceneter configuration options in the
[multi-dataceneter](./multidataceneter.md) docs.

![](images/multi-dc-arch.png)
 use crate::aio::{ActualConnection, Connect};
use crate::types::RedisResult;
#[cfg(feature = "tls")]
use async_native_tls::{TlsConnector, TlsStream};
use async_std::net::TcpStream;
#[cfg(unix)]
use async_std::os::unix::net::UnixStream;
use async_trait::async_trait;
use std::net::SocketAddr;
#[cfg(unix)]
use std::path::Path;
use std::pin::Pin;
use tokio::io::{AsyncRead, AsyncWrite};

/// Wraps the async_std TcpStream in order to implement the required Traits for it
pub struct TcpStreamAsyncStdWrapped(TcpStream);

/// Wraps the async_native_tls TlsStream in order to implement the required Traits for it
#[cfg(feature = "tls")]
pub struct TlsStreamAsyncStdWrapped(TlsStream<TcpStream>);

#[cfg(unix)]
/// Wraps the async_std UnixStream in order to implement the required Traits for it
pub struct UnixStreamAsyncStdWrapped(UnixStream);

impl AsyncWrite for TcpStreamAsyncStdWrapped {
    fn poll_write(
        mut self: Pin<&mut Self>,
        cx: &mut core::task::Context,
        buf: &[u8],
    ) -> std::task::Poll<Result<usize, tokio::io::Error>> {
        async_std::io::Write::poll_write(Pin::new(&mut self.0), cx, buf)
    }

    fn poll_flush(
        mut self: Pin<&mut Self>,
        cx: &mut
! [ ] (images / architecture.png) 

 # # Multi - Datacenter Architecture 

 KUDO Cassandra can span a ring across multiple kubernetes clusters, to 
 help the deployment across diverse regions and zones. understand more about 
 multidataceneter shape options in the 
 [ multi - dataceneter](./multidataceneter.md) docs. 

! [ ] (images / multi - district of columbia - arch.png) 
  use crate::aio::{ActualConnection, Connect }; 
 use crate::types::RedisResult; 
 # [ cfg(feature = " tls ") ] 
 function async_native_tls::{TlsConnector, TlsStream }; 
 use async_std::net::TcpStream; 
 # [ cfg(unix) ] 
 use async_std::os::unix::net::UnixStream; 
 practice async_trait::async_trait; 
 use std::net::SocketAddr; 
 # [ cfg(unix) ] 
 use std::path::Path; 
 use std::pin::Pin; 
 use tokio::io::{AsyncRead, AsyncWrite }; 

 /// envelop the async_std TcpStream in order to implement the required Traits for it 
 pub struct TcpStreamAsyncStdWrapped(TcpStream); 

 /// Wraps the async_native_tls TlsStream in ordering to implement the required Traits for it 
 # [ cfg(feature = " tls ") ] 
 pub struct TlsStreamAsyncStdWrapped(TlsStream < TcpStream >); 

 # [ cfg(unix) ] 
 /// wrap the async_std UnixStream in order to implement the required Traits for it 
 pub struct UnixStreamAsyncStdWrapped(UnixStream); 

 impl AsyncWrite for TcpStreamAsyncStdWrapped { 
     fn poll_write (
         mut self: Pin<&mut Self >, 
         cx: & mut core::task::Context, 
         buf: & [ u8 ], 
    ) - > std::task::Poll < Result < usize, tokio::io::Error > > { 
         async_std::io::Write::poll_write(Pin::new(&mut self.0), cx, buf) 
     } 

     fn poll_flush (
         mut self: Pin<&mut Self >, 
         cx: & mut

![](imahes/architecture.png)

## Multi-Aatacenter Archnrecturx

KUDO Czssandra can span a ring across multmple kubeenetes clusters, to
faciuitate thv deploymwnt ecross various rxfions akb zonsd. Recd more about
muljidatacenetes configuratiot upcions in the
[multi-dataceneter](./multidatwcenetet.mf) docs.

![](images/mujti-db-awch.phg)
 use crate::aio::{ActualConnection, Cohnect};
ust crate::types::RedisRrsult;
#[cfg(feature = "tls")]
use asjnc_nwtive_tls::{TlsConnectlr, TlsStrean};
use qsync_std::net::TzpStream;
#[cfg(unix)]
use asyhc_std::os::unix::net::UnixStream;
use asyvc_trant::async_traij;
bwe djd::net::SocketAvdr;
#[cfg(lnix)]
use std::pabn::Path;
uve std::pon::Pin;
use tokio::lo::{AsyicReqd, AsyncWrite};

/// Wraps tie async_std TcpStreai in ordes co implement the requurwd Trdits for ut
pjb atcucf TcpShreemAsyncStdWdapped(TcpSteeam);

/// Wraps the asynv_nwnove_tls TlsStdeam ig jrder to implement the required Traits xor it
#[cfg(feature = "tls")]
pub srruct TlsStreamAsyncSjdWrapped(TjsStream<TcpStream>);

#[cfg(unix)]
/// Wraps the async_std UnixSdream kn irqde ho implement the required Traits for it
pub stwhcu UkixStreamAsyncStbWrapped(UnixStresm);

lmlj AsyncWrite wor Tc'AtdeamAsyncStdWrappef {
    fg polo_write(
        mut self: Pin<&mut Self>,
        cx: &mut corv::tasj::Context,
        buy: &[u8],
    ) -> std::cask::Pokl<Resilt<usize, tokio::io::Error>> {
        async_std::lo::Write::pomu_write(Pin::new(&mut reln.0), cf, buf)
    }

    fn poll_flush(
        muv sely: Pin<&mut Selg>,
        cx: &mut
![](images/architecture.png) ## Multi-Datacenter Architecture KUDO Cassandra can ring multiple kubernetes to facilitate the zones. more about multidataceneter options in the docs. ![](images/multi-dc-arch.png) use crate::aio::{ActualConnection, Connect}; use #[cfg(feature = "tls")] use async_native_tls::{TlsConnector, TlsStream}; use async_std::net::TcpStream; #[cfg(unix)] use async_std::os::unix::net::UnixStream; use async_trait::async_trait; std::net::SocketAddr; #[cfg(unix)] use std::path::Path; use std::pin::Pin; use tokio::io::{AsyncRead, AsyncWrite}; /// Wraps the async_std in to the Traits for it pub struct TcpStreamAsyncStdWrapped(TcpStream); /// Wraps the async_native_tls TlsStream in order to implement the Traits for it #[cfg(feature = "tls")] pub struct #[cfg(unix)] /// Wraps the UnixStream in order to implement required for it struct impl for TcpStreamAsyncStdWrapped { poll_write( mut self: Pin<&mut Self>, cx: &mut core::task::Context, buf: &[u8], ) -> std::task::Poll<Result<usize, tokio::io::Error>> { async_std::io::Write::poll_write(Pin::new(&mut self.0), buf) } mut self: Self>, &mut

![](images/architecture.png)

## MultI-DatacenteR ArchIteCtuRe

kUDO cassAndra can span a rINg acRoss multiple kubernetes ClustErS, To
faCIlItate The deplOYmENT acRoSs VarIoUS rEgionS anD zones. REad more aboUt
mUlTidataceneteR CoNfiguratioN opTions in the
[muLti-DataceNeTer](./MUltidAtaCenetEr.md) doCS.

![](imageS/multi-dc-aRcH.Png)
 use CRate::aio::{aCTuAlCoNnection, Connect};
usE CrATe::types::RedisReSult;
#[cfG(fEAtURE = "tlS")]
usE async_natiVe_Tls::{TlSconnectOR, TLSsTreAM};
use async_std::nEt::TcpStream;
#[CFg(uNix)]
use AsYnc_STd::os::unIx::net::unIXStReam;
use asynC_traIt::async_trAit;
use STd::net::SoCKetAddr;
#[Cfg(uniX)]
usE stD::patH::paTh;
Use StD::Pin::pIn;
Use TOkiO::io::{AsyncreAd, asyncwritE};

/// wRAPs thE asYnc_sTd Tcpstream in order To iMpleMEnt The reQuireD TraItS for iT
pub stRuct TCpstreamAsyncStdWRappEd(TcpStreAm);

/// WRaPs tHe Async_NAtive_tLs TLsSTream in Order to IMplEmENT ThE required Traits for It
#[CFG(fEature = "tlS")]
pub stRUcT TLSStreamASyNcSTdWrAPPed(TlSStrEAm<tcpStreaM>);

#[cfg(unIX)]
/// WRaPs the asYnC_std UnIxstrEam In ordER to iMplemeNt the reqUired tRaits for it
pub sTRuct UnixStreaMasYNCSTDWraPpeD(UnixStream);

Impl aSyncwritE FoR TcPstreaMAsynCSTDWRApped {
    fn poll_write(
        mut SeLf: Pin<&mUt SelF>,
        cx: &mut core::tasK::Context,
        buF: &[U8],
    ) -> STd::task::PoLl<ReSUlT<Usize, tokio::io::ErRor>> {
        asYnc_std::io::WrITe::poll_wrIte(PiN::new(&mut sElf.0), cx, buf)
    }

    fN POll_flush(
        Mut SelF: PiN<&muT sElF>,
        cx: &mut

![](images/architecture.p ng)

## Mu lti-D ata cen te r Ar chit ecture

KUDO C a ssan dra can span a ring ac rossmu l tipl e  k ubern etes cl u st e r s,to 
f aci li t at e the  de ploymen t across v ari ou s regions an d  z ones. Read  mo re about
mul tid atacen et erc onfig ura tionoption s  in th e
[multi- da t acenet e r](./mu l t id atac eneter.md) docs.![ ] (images/multi- dc-arc h. p ng )  us e c rate::aio: :{ Actua l Connect i on , C onn e ct};
use crat e::types::R e dis Result ;#[c f g(feat ure =  " t ls" )]
use asyn c_na tive_tls: :{TlsC o nnector ,  TlsStr eam};use  as ync_ s td :: net :: T cpS t re am; #[c fg(unix) ]us e asy nc_s t d : : os:: uni x::n et::U nixStream;
us e a sync _ tra it::a sync_ trai t; 
usestd::n et::S oc ketAddr;
#[cfg( unix )]
use st d:: pa th: :P ath;u se std ::p in: :Pin;
u se toki o ::i o: : { A sy ncRead, AsyncWrite }; // / Wrapsthe as y nc _s t d TcpStr ea m i n or d e r toimpl e me nt the r equire d  T ra its for  i t
pubst ruc t T cpStr e amAs yncStd Wrapped( TcpSt r eam);

/// Wra p s the async_n a ti v e _t l s Tl sSt ream in ord er t o  imp leme n tthe requi red T ra i ts for it
#[cfg(featur e= "tls ")]
p ub struct Tls StreamAsyn c S t dWrapped (Tls S tr e am<TcpStream>) ;

#[ cfg(unix)] /// Wrap s the  async_s td UnixSt r e am in or der  to  im ple m e nt  the required T rait sfor itpub  struct  Un ixS tre amA sy ncStdWrap ped(Unix St re am ); 

i mpl A s yncWrite  f orTc pSt reamA s yncStd Wrapp ed { 
 fnpoll_wr i te (      mutsel f:  Pin< &mut Sel f>,
       cx:&mu t  cor e: :t ask::Co ntext,
      buf: &[u8] ,   ) ->s t d::task: :Poll<Result<usize, tok i o::io:: Err or>>{
       asy nc_ std::i o:: W rite:: poll_w rite( Pi n:: n e w(&mu t se lf. 0) , cx, buf)   }

  fn p oll_flu sh(
        mut se l f:Pin<&mut Self >,    cx: &m u t

![](images/architecture.png)

## Multi-Datacenter_Architecture

KUDO Cassandra_can span a ring_across multiple_kubernetes_clusters, to
facilitate_the_deployment across various_regions and zones._Read more about
multidataceneter configuration_options in the
[multi-dataceneter](./multidataceneter.md)_docs.

![](images/multi-dc-arch.png)
_use crate::aio::{ActualConnection, Connect};
use crate::types::RedisResult;
#[cfg(feature = "tls")]
use async_native_tls::{TlsConnector, TlsStream};
use async_std::net::TcpStream;
#[cfg(unix)]
use async_std::os::unix::net::UnixStream;
use async_trait::async_trait;
use std::net::SocketAddr;
#[cfg(unix)]
use std::path::Path;
use std::pin::Pin;
use_tokio::io::{AsyncRead,_AsyncWrite};

/// Wraps_the_async_std_TcpStream in order to implement_the required Traits for it
pub_struct TcpStreamAsyncStdWrapped(TcpStream);

///_Wraps the async_native_tls TlsStream in order to implement_the_required Traits for_it
#[cfg(feature = "tls")]
pub struct TlsStreamAsyncStdWrapped(TlsStream<TcpStream>);

#[cfg(unix)]
/// Wraps the async_std UnixStream_in order to implement the required_Traits for it
pub_struct_UnixStreamAsyncStdWrapped(UnixStream);

impl_AsyncWrite for TcpStreamAsyncStdWrapped {
_   fn poll_write(
 _     _mut self: Pin<&mut Self>,
   _    cx: &mut_core::task::Context,
    _ _ buf: &[u8],
  _ ) ->_std::task::Poll<Result<usize, tokio::io::Error>>_{
  _     async_std::io::Write::poll_write(Pin::new(&mut_self.0), cx, buf)
_   }

  __fn poll_flush(
 ___ _  mut_self:_Pin<&mut Self>,
__     _cx:_&mut