You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/architecture/distributed-cloud-native-apps-containers/cloud-native-identity/identity-server.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,7 +50,7 @@ You can add it to your applications using its NuGet packages. The main package i
50
50
51
51
## Configuration
52
52
53
-
IdentityServer supports different kinds of protocols and social authentication providers that can be configured as part of each custom installation. This is typically done in the ASP.NET Core application's `Program` class (or in the `Startup` class in the `ConfigureServices` method). The configuration involves specifying the supported protocols and the paths to the servers and endpoints that will be used. Figure 11-2 shows an example configuration taken from the IdentityServer Quickstart UI project:
53
+
IdentityServer supports different kinds of protocols and social authentication providers that can be configured as part of each custom installation. This is typically done in the ASP.NET Core application's `Program` class (or in the `Startup` class in the `ConfigureServices` method). The configuration involves specifying the supported protocols and the paths to the servers and endpoints that will be used. The following code shows an example configuration taken from the IdentityServer Quickstart UI project:
Copy file name to clipboardExpand all lines: docs/architecture/distributed-cloud-native-apps-containers/cloud-native-resiliency/cloud-infrastructure-resiliency-azure.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,7 +45,7 @@ To architect redundancy, you need to identify the critical paths in your applica
45
45
46
46
-**Plan for multiregion deployment.** If you deploy your application to a single region, and that region becomes unavailable, your application will also become unavailable. This may be unacceptable under the terms of your application's service level agreements. Otherwise, consider deploying your application and its services across multiple regions. For example, an Azure Kubernetes Service (AKS) cluster is deployed to a single region. To protect your system from a regional failure, you might deploy your application to multiple AKS clusters across different regions and use the [Paired Regions](/azure/virtual-machines/regions#region-pairs) feature to coordinate platform updates and prioritize recovery efforts.
47
47
48
-
-**Enable [geo-replication](/azure/sql-database/sql-database-active-geo-replication).** Geo-replication for services such as Azure SQL Database and Cosmos DB will create secondary replicas of your data across multiple regions. While both services automatically replicate data within the same region, geo-replication protects you against a regional outage by enabling you to fail over to a secondary region. Another best practice for geo-replication centers around storing container images. To deploy a service in AKS, you need to store and pull the image from a repository. Azure Container Registry integrates with AKS and can securely store container images. To improve performance and availability, consider geo-replicating your images to a registry in each region where you have an AKS cluster. Each AKS cluster then pulls container images from the local container registry in its region as shown in Figure 6-4:
48
+
-**Enable [geo-replication](/azure/sql-database/sql-database-active-geo-replication).** Geo-replication for services such as Azure SQL Database and Cosmos DB will create secondary replicas of your data across multiple regions. While both services automatically replicate data within the same region, geo-replication protects you against a regional outage by enabling you to fail over to a secondary region. Another best practice for geo-replication centers around storing container images. To deploy a service in AKS, you need to store and pull the image from a repository. Azure Container Registry integrates with AKS and can securely store container images. To improve performance and availability, consider geo-replicating your images to a registry in each region where you have an AKS cluster. Each AKS cluster then pulls container images from the local container registry in its region as shown in Figure 9-4:
@@ -61,11 +61,11 @@ The cloud thrives on scaling. The ability to increase or decrease system resourc
61
61
62
62
-**Partition workloads.** Decomposing domains into independent, self-contained microservices enables each service to scale independently of others. Typically, services will have different scalability needs and requirements. Partitioning enables you to scale only what needs to be scaled without the unnecessary cost of scaling an entire application.
63
63
64
-
-**Favor scale-out.** Cloud-based applications favor scaling out resources as opposed to scaling up. Scaling out (also known as horizontal scaling) involves adding more service resources to an existing system to meet and share a desired level of performance. Scaling up (also known as vertical scaling) involves replacing existing resources with more powerful hardware (more disk, memory, and processing cores). Scaling out can be invoked automatically with the autoscaling features available in some Azure cloud resources. Scaling out across multiple resources also adds redundancy to the overall system. Finally scaling up a single resource is typically more expensive than scaling out across many smaller resources. Figure 6-6 shows the two approaches:
64
+
-**Favor scale-out.** Cloud-based applications favor scaling out resources as opposed to scaling up. Scaling out (also known as horizontal scaling) involves adding more service resources to an existing system to meet and share a desired level of performance. Scaling up (also known as vertical scaling) involves replacing existing resources with more powerful hardware (more disk, memory, and processing cores). Scaling out can be invoked automatically with the autoscaling features available in some Azure cloud resources. Scaling out across multiple resources also adds redundancy to the overall system. Finally scaling up a single resource is typically more expensive than scaling out across many smaller resources. Figure 9-5 shows the two approaches:
65
65
66
66
:::image type="content" source="media/scale-up-scale-out.png" alt-text="A diagram showing the differences between scale up (vertical scaling) versus scale out (horizontal scaling)." border="false":::
67
67
68
-
**Figure 9-6**. Scale up versus scale out
68
+
**Figure 9-5**. Scale up versus scale out
69
69
70
70
-**Scale proportionally.** When scaling a service, think in terms of *resource sets*. If you were to scale out a specific service dramatically, what impact would that have on back-end data stores, caches, and dependent services? Some resources such as Cosmos DB can scale out proportionally, while many others can't. You want to ensure that you don't scale out a resource to a point where it will exhaust other associated resources.
Copy file name to clipboardExpand all lines: docs/architecture/distributed-cloud-native-apps-containers/cloud-native-resiliency/resilient-communication.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,15 +30,15 @@ A better approach is an evolving technology entitled *Service Mesh*. A [service
30
30
31
31
:::image type="content" source="media/service-mesh-with-side-car.png" alt-text="A diagram showing a service mesh using sidecars." border="false":::
32
32
33
-
**Figure 9-7**. Service mesh with a sidecar
33
+
**Figure 9-6**. Service mesh with a sidecar
34
34
35
35
In the previous figure, note how the proxy intercepts and manages communication among the microservices and the cluster.
36
36
37
37
A service mesh is logically split into two disparate components: A [data plane](https://blog.envoyproxy.io/service-mesh-data-plane-vs-control-plane-2774e720f7fc) and [control plane](https://blog.envoyproxy.io/service-mesh-data-plane-vs-control-plane-2774e720f7fc).
38
38
39
39
:::image type="content" source="media/istio-control-and-data-plane.png" alt-text="A diagram showing a service mesh control and data plane" border="false":::
40
40
41
-
**Figure 9-8.** Service mesh control and data plane
41
+
**Figure 9-7.** Service mesh control and data plane
42
42
43
43
Once configured, a service mesh is highly functional. It can retrieve a corresponding pool of instances from a service discovery endpoint. The mesh can then send a request to a specific instance, recording the latency and response type of the result. A mesh can choose the instance most likely to return a fast response based on many factors, including its observed latency for recent requests.
Copy file name to clipboardExpand all lines: docs/architecture/distributed-cloud-native-apps-containers/data-patterns/azure-caching.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,11 +26,11 @@ Also consider caching to avoid repetitive computations. If an operation transfor
26
26
27
27
## Caching architecture
28
28
29
-
Cloud native applications typically implement a distributed caching architecture. The cache is hosted as a cloud-based backing service, separate from the microservices. Figure 5-15 shows the architecture.
29
+
Cloud native applications typically implement a distributed caching architecture. The cache is hosted as a cloud-based backing service, separate from the microservices. Figure 8-14 shows the architecture.
30
30
31
31

32
32
33
-
**Figure 5-15**. Caching in a cloud-native app
33
+
**Figure 8-14**. Caching in a cloud-native app
34
34
35
35
The previous figure presents a common caching pattern known as the [cache-aside pattern](/azure/architecture/patterns/cache-aside). For an incoming request, you first query the cache (step \#1) for a response. If found, the data is returned immediately. If the data doesn't exist in the cache (known as a [cache miss](https://www.techopedia.com/definition/6308/cache-miss)), it's retrieved from a local database in a downstream service (step \#2). It's then written to the cache for future requests (step \#3), and returned to the caller. Care must be taken to periodically evict cached data so that the system remains timely and consistent.
Copy file name to clipboardExpand all lines: docs/architecture/distributed-cloud-native-apps-containers/data-patterns/data-driven-crud-microservice.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,13 +16,13 @@ From a design point of view, this type of containerized microservice is very sim
16
16
17
17

18
18
19
-
**Figure 6-4**. Internal design for simple CRUD microservices
19
+
**Figure 8-15**. Internal design for simple CRUD microservices
20
20
21
21
An example of this kind of simple data-drive service is the catalog microservice from the eShop Reference Architecture sample application. This type of service implements all its functionality in a single ASP.NET Core Web API project that includes classes for its data model, its business logic, and its data access code. It also stores its related data in a database running in SQL Server (as another container for dev/test purposes), but could also be any regular SQL Server host:
22
22
23
23

This diagram shows the logical Catalog microservice, that includes its Catalog database, which can be or not in the same Docker host. Having the database in the same Docker host might be good for development, but not for production. When you are developing this kind of service, you only need [ASP.NET Core](/aspnet/core/) and a data-access API or ORM like [Entity Framework Core](/ef/core/index).
28
28
@@ -36,13 +36,13 @@ To implement a simple CRUD microservice using .NET and Visual Studio, you start
36
36
37
37

38
38
39
-
**Figure 6-6**. Creating an ASP.NET Core Web API project in Visual Studio 2019
39
+
**Figure 8-17**. Creating an ASP.NET Core Web API project in Visual Studio 2019
40
40
41
41
To create an ASP.NET Core Web API Project, first select an ASP.NET Core Web Application and then select the API type. After creating the project, you can implement your MVC controllers as you would in any other Web API project, using the Entity Framework API or other API. In a new Web API project, you can see that the only dependency you have in that microservice is on ASP.NET Core itself.
42
42
43
43

44
44
45
-
**Figure 6-7**. Dependencies in a simple CRUD Web API microservice
45
+
**Figure 8-18**. Dependencies in a simple CRUD Web API microservice
46
46
47
47
The API project includes references to Microsoft.AspNetCore.App NuGet package, that includes references to all essential packages. It could include some other packages as well.
48
48
@@ -247,7 +247,7 @@ This means you can complement your API with a nice discovery UI to help develope
247
247
248
248

249
249
250
-
**Figure 6-8**. Swashbuckle API Explorer based on Swagger metadata—eShopOnContainers catalog microservice
250
+
**Figure 8-19**. Swashbuckle API Explorer based on Swagger metadata—eShopOnContainers catalog microservice
251
251
252
252
The Swashbuckle generated Swagger UI API documentation includes all published actions. The API explorer is not the most important thing here. You can use tools like [swagger-codegen](https://github.com/swagger-api/swagger-codegen) which allow code generation of API client libraries, server stubs, and documentation automatically.
253
253
@@ -285,11 +285,11 @@ Once this is done, you can start your application and browse the following Swagg
285
285
http://<your-root-url>/swagger/
286
286
```
287
287
288
-
You previously saw the generated UI created by Swashbuckle for a URL like `http://<your-root-url>/swagger`. In Figure 6-9, you can also see how you can test any API method.
288
+
You previously saw the generated UI created by Swashbuckle for a URL like `http://<your-root-url>/swagger`. In Figure 8-20, you can also see how you can test any API method.
289
289
290
290

291
291
292
-
**Figure 6-9**. Swashbuckle UI testing the Catalog/Items API method
292
+
**Figure 8-20**. Swashbuckle UI testing the Catalog/Items API method
293
293
294
294
The Swagger UI API detail shows a sample of the response and can be used to execute the real API, which is great for developer discovery.
0 commit comments