Browse Source

docs(all): update to main replica (#477)

pull/418/merge
gabriel-tessier 3 years ago
committed by GitHub
parent
commit
1fdfdc4c62
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 27 additions and 27 deletions
  1. +15
    -15
      docs/getting-started/examples.md
  2. +5
    -5
      docs/guides/cluster.md
  3. +7
    -7
      docs/guides/edge.md

+ 15
- 15
docs/getting-started/examples.md View File

@@ -42,13 +42,13 @@ with Diagram("Clustered Web Services", show=False):
ECS("web3")] ECS("web3")]


with Cluster("DB Cluster"): with Cluster("DB Cluster"):
db_master = RDS("userdb")
db_master - [RDS("userdb ro")]
db_main = RDS("userdb")
db_main - [RDS("userdb ro")]


memcached = ElastiCache("memcached") memcached = ElastiCache("memcached")


dns >> lb >> svc_group dns >> lb >> svc_group
svc_group >> db_master
svc_group >> db_main
svc_group >> memcached svc_group >> memcached
``` ```


@@ -196,14 +196,14 @@ with Diagram("Advanced Web Service with On-Premise", show=False):
Server("grpc3")] Server("grpc3")]


with Cluster("Sessions HA"): with Cluster("Sessions HA"):
master = Redis("session")
master - Redis("replica") << metrics
grpcsvc >> master
main = Redis("session")
main - Redis("replica") << metrics
grpcsvc >> main


with Cluster("Database HA"): with Cluster("Database HA"):
master = PostgreSQL("users")
master - PostgreSQL("slave") << metrics
grpcsvc >> master
main = PostgreSQL("users")
main - PostgreSQL("replica") << metrics
grpcsvc >> main


aggregator = Fluentd("logging") aggregator = Fluentd("logging")
aggregator >> Kafka("stream") >> Spark("analytics") aggregator >> Kafka("stream") >> Spark("analytics")
@@ -239,14 +239,14 @@ with Diagram(name="Advanced Web Service with On-Premise (colored)", show=False):
Server("grpc3")] Server("grpc3")]


with Cluster("Sessions HA"): with Cluster("Sessions HA"):
master = Redis("session")
master - Edge(color="brown", style="dashed") - Redis("replica") << Edge(label="collect") << metrics
grpcsvc >> Edge(color="brown") >> master
main = Redis("session")
main - Edge(color="brown", style="dashed") - Redis("replica") << Edge(label="collect") << metrics
grpcsvc >> Edge(color="brown") >> main


with Cluster("Database HA"): with Cluster("Database HA"):
master = PostgreSQL("users")
master - Edge(color="brown", style="dotted") - PostgreSQL("slave") << Edge(label="collect") << metrics
grpcsvc >> Edge(color="black") >> master
main = PostgreSQL("users")
main - Edge(color="brown", style="dotted") - PostgreSQL("replica") << Edge(label="collect") << metrics
grpcsvc >> Edge(color="black") >> main


aggregator = Fluentd("logging") aggregator = Fluentd("logging")
aggregator >> Edge(label="parse") >> Kafka("stream") >> Edge(color="black", style="bold") >> Spark("analytics") aggregator >> Edge(label="parse") >> Kafka("stream") >> Edge(color="black", style="bold") >> Spark("analytics")


+ 5
- 5
docs/guides/cluster.md View File

@@ -22,11 +22,11 @@ with Diagram("Simple Web Service with DB Cluster", show=False):
web = ECS("service") web = ECS("service")


with Cluster("DB Cluster"): with Cluster("DB Cluster"):
db_master = RDS("master")
db_master - [RDS("slave1"),
RDS("slave2")]
db_main = RDS("main")
db_main - [RDS("replica1"),
RDS("replica2")]


dns >> web >> db_master
dns >> web >> db_main
``` ```


![simple web service with db cluster diagram](/img/simple_web_service_with_db_cluster_diagram.png) ![simple web service with db cluster diagram](/img/simple_web_service_with_db_cluster_diagram.png)
@@ -68,4 +68,4 @@ with Diagram("Event Processing", show=False):


![event processing diagram](/img/event_processing_diagram.png) ![event processing diagram](/img/event_processing_diagram.png)


> There is no depth limit of nesting. Feel free to create nested clusters as deep as you want.
> There is no depth limit of nesting. Feel free to create nested clusters as deep as you want.

+ 7
- 7
docs/guides/edge.md View File

@@ -35,22 +35,22 @@ with Diagram(name="Advanced Web Service with On-Premise (colored)", show=False):
Server("grpc3")] Server("grpc3")]


with Cluster("Sessions HA"): with Cluster("Sessions HA"):
master = Redis("session")
master \
main = Redis("session")
main \
- Edge(color="brown", style="dashed") \ - Edge(color="brown", style="dashed") \
- Redis("replica") \ - Redis("replica") \
<< Edge(label="collect") \ << Edge(label="collect") \
<< metrics << metrics
grpcsvc >> Edge(color="brown") >> master
grpcsvc >> Edge(color="brown") >> main


with Cluster("Database HA"): with Cluster("Database HA"):
master = PostgreSQL("users")
master \
main = PostgreSQL("users")
main \
- Edge(color="brown", style="dotted") \ - Edge(color="brown", style="dotted") \
- PostgreSQL("slave") \
- PostgreSQL("replica") \
<< Edge(label="collect") \ << Edge(label="collect") \
<< metrics << metrics
grpcsvc >> Edge(color="black") >> master
grpcsvc >> Edge(color="black") >> main


aggregator = Fluentd("logging") aggregator = Fluentd("logging")
aggregator \ aggregator \


Loading…
Cancel
Save