{"id":2078,"date":"2026-07-08T05:51:38","date_gmt":"2026-07-08T05:51:38","guid":{"rendered":"https:\/\/www.vpascode.com\/vn\/docs\/uncategorized\/mermaid-js-architecture-diagram-syntax-layout-guide\/"},"modified":"2026-07-08T05:51:38","modified_gmt":"2026-07-08T05:51:38","slug":"mermaid-js-architecture-diagram-syntax-layout-guide","status":"publish","type":"ld_docs","link":"https:\/\/www.vpascode.com\/vn\/docs\/vpascode-docs\/mermaid-js-playbook\/mermaid-js-architecture-diagram-syntax-layout-guide","title":{"rendered":"H\u01b0\u1edbng d\u1eabn c\u00fa ph\u00e1p v\u00e0 b\u1ed1 c\u1ee5c s\u01a1 \u0111\u1ed3 ki\u1ebfn tr\u00fac Mermaid.js"},"content":{"rendered":"<p>S\u01a1 \u0111\u1ed3 ki\u1ebfn tr\u00fac cung c\u1ea5p b\u1ea3n v\u1ebd c\u1ea5u tr\u00fac \u0111\u01b0\u1ee3c c\u00e1c ki\u1ebfn tr\u00fac s\u01b0 h\u1ec7 th\u1ed1ng v\u00e0 nh\u00f3m DevOps s\u1eed d\u1ee5ng \u0111\u1ec3 tr\u1ef1c quan h\u00f3a c\u00e1c thi\u1ebft l\u1eadp h\u1ea1 t\u1ea7ng, c\u00e1c d\u1ecbch v\u1ee5 vi m\u00f4 \u0111\u00e1m m\u00e2y v\u00e0 c\u1ea5u h\u00ecnh b\u1ed1 c\u1ee5c c\u1ea5u tr\u00fac. \u0110\u01b0\u1ee3c x\u00e2y d\u1ef1ng tr\u00ean n\u1ec1n t\u1ea3ng <code>architecture-beta<\/code> \u0111\u1ed9ng c\u01a1, c\u00f4ng c\u1ee5 d\u1ef1a tr\u00ean v\u0103n b\u1ea3n n\u00e0y thay th\u1ebf c\u00e1c c\u00f4ng c\u1ee5 k\u00e9o th\u1ea3 th\u1ee7 c\u00f4ng b\u1eb1ng c\u00e1ch t\u1ef1 \u0111\u1ed9ng s\u1eafp x\u1ebfp c\u00e1c nh\u00f3m d\u1ecbch v\u1ee5 c\u1ea5u tr\u00fac, c\u1ee5m c\u01a1 s\u1edf d\u1eef li\u1ec7u, c\u1ed5ng giao ti\u1ebfp v\u00e0 c\u00e1c \u0111\u01b0\u1eddng \u0111i \u1edf bi\u00ean th\u00e0nh c\u00e1c b\u1ed1 c\u1ee5c h\u1ec7 th\u1ed1ng s\u1ea1ch s\u1ebd, c\u00f3 th\u1ec3 d\u1ef1 \u0111o\u00e1n \u0111\u01b0\u1ee3c.<\/p>\n<h2>C\u1ea5u tr\u00fac c\u00fa ph\u00e1p c\u01a1 b\u1ea3n<\/h2>\n<p>M\u1ed7i s\u01a1 \u0111\u1ed3 b\u1eaft \u0111\u1ea7u b\u1eb1ng ph\u1ea7n khai b\u00e1o <code>architecture-beta<\/code>ti\u00eau \u0111\u1ec1 khai b\u00e1o. B\u1ea1n \u0111i\u1ec1n \u0111\u1ea7y b\u1ea3ng v\u1ebd b\u1eb1ng c\u00e1ch x\u00e1c \u0111\u1ecbnh c\u00e1c ph\u1ea7n t\u1eed n\u00fat ri\u00eang l\u1ebb b\u1eb1ng t\u1eeb kh\u00f3a <code>service<\/code>t\u1eeb kh\u00f3a, v\u00e0 \u00e1nh x\u1ea1 c\u00e1c \u0111\u01b0\u1eddng k\u1ebft n\u1ed1i b\u1eb1ng c\u00e1ch x\u00e1c \u0111\u1ecbnh c\u00e1c c\u1ed5ng t\u1ecda \u0111\u1ed9 h\u01b0\u1edbng ch\u00ednh x\u00e1c (<strong>T<\/strong>p, <strong>B<\/strong>ottom, <strong>L<\/strong>eft, <strong>R<\/strong>ight) \u0111\u01b0\u1ee3c ph\u00e2n c\u00e1ch b\u1edfi d\u1ea5u hai ch\u1ea5m v\u00e0 d\u1ea5u g\u1ea1ch \u0111\u00f4i.<\/p>\n<div class=\"vpascode-viewer-container vpascode-fancy-active\">\n<div class=\"vpascode-header\">\n<span class=\"vpascode-lang-label\">Mermaid<\/span>\n<a class=\"vpascode-fancy-btn\" href=\"https:\/\/www.vpascode.com\/editor\/#mermaid:eNpLLErOyCxJTS4pLUrVTUotSeTlUlAoTi0qy0xOVUhPLEktT6zUyMwrSS3KSy3RjHaHiCj4JCal5sQiqwXRqUUaEEoz2rGgQCEYzAarAmGoaVZOCrq6CiFWEJUAa2srnQ==\" rel=\"noopener noreferrer\" target=\"_blank\">\n<svg fill=\"none\" height=\"14\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2.5\" style=\"margin-right: 8px;\" viewbox=\"0 0 24 24\" width=\"14\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg>\n<span>Ch\u1ec9nh s\u1eeda Mermaid trong VPasCode<\/span>\n<\/a>\n<\/div>\n<div class=\"vpascode-code-wrapper\">\n            <div class=\"vpascode-viewer-container vpascode-fancy-active\">\r\n                                <div class=\"vpascode-header\">\r\n                    <span class=\"vpascode-lang-label\">Mermaid<\/span>\r\n                    <a href=\"https:\/\/www.vpascode.com\/editor\/#mermaid:eNpLLErOyCxJTS4pLUrVTUotSeTlUlAoTi0qy0xOVUhPLEktT6zUyMwrSS3KSy3RjPbLOLw4T8H54e6peemxyEpBdGqRBoTSjPY9vLBSITnj4e7lCg93r8hLV0h5uHspVAsIQ022clLQ1VUIsYJoAwDQLTUx\" \r\n                       target=\"_blank\" \r\n                       rel=\"noopener noreferrer\" \r\n                       class=\"vpascode-fancy-btn\">\r\n                        <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" style=\"margin-right: 8px;\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg>\r\n                        <span>Edit Mermaid in VPasCode<\/span>\r\n                    <\/a>\r\n                <\/div>\r\n                                <div class=\"vpascode-code-wrapper\">\r\n                    <pre class=\"lang-mermaid\"><code class=\"language-mermaid\" data-language=\"mermaid\" class=\"language-mermaid\">architecture-beta\r\n  service gateway(internet)[Nh\u00e3n C\u1ed5ng]\r\n  service server(server)[M\u00e1y ch\u1ee7 \u1ee8ng d\u1ee5ng]\r\n  \r\n  gateway:B -- T:server<\/code><\/pre>                <\/div>\r\n                <div class=\"vpascode-actions\">\r\n                    <a href=\"https:\/\/www.vpascode.com\/editor\/#mermaid:eNpLLErOyCxJTS4pLUrVTUotSeTlUlAoTi0qy0xOVUhPLEktT6zUyMwrSS3KSy3RjPbLOLw4T8H54e6peemxyEpBdGqRBoTSjPY9vLBSITnj4e7lCg93r8hLV0h5uHspVAsIQ022clLQ1VUIsYJoAwDQLTUx\" \r\n                       target=\"_blank\" \r\n                       rel=\"noopener noreferrer\" \r\n                       class=\"vpascode-fancy-btn\">\r\n                        <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" style=\"margin-right: 6px;\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg>\r\n                        <span>Edit Mermaid in VPasCode<\/span>\r\n                    <\/a>\r\n                <\/div>\r\n            <\/div>\r\n             <\/div>\n<div class=\"vpascode-actions\">\n<a class=\"vpascode-fancy-btn\" href=\"https:\/\/www.vpascode.com\/editor\/#mermaid:eNpLLErOyCxJTS4pLUrVTUotSeTlUlAoTi0qy0xOVUhPLEktT6zUyMwrSS3KSy3RjHaHiCj4JCal5sQiqwXRqUUaEEoz2rGgQCEYzAarAmGoaVZOCrq6CiFWEJUAa2srnQ==\" rel=\"noopener noreferrer\" target=\"_blank\">\n<svg fill=\"none\" height=\"14\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2.5\" style=\"margin-right: 6px;\" viewbox=\"0 0 24 24\" width=\"14\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg>\n<span>Ch\u1ec9nh s\u1eeda Mermaid trong VPasCode<\/span>\n<\/a>\n<\/div>\n<\/div>\n<p id=\"FAOSZRK\"><img fetchpriority=\"high\" alt=\"\" class=\"alignnone size-full wp-image-951\" decoding=\"async\" fetchpriority=\"high\" height=\"384\" sizes=\"(max-width: 186px) 100vw, 186px\" src=\"https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/07\/img_6a4de8359768b.png\" srcset=\"https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/07\/img_6a4de8359768b.png 186w, https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/07\/img_6a4de8359768b-145x300.png 145w\" width=\"186\"\/><\/p>\n<h2>Tham chi\u1ebfu c\u00fa ph\u00e1p<\/h2>\n<p>B\u1ea3ng d\u01b0\u1edbi \u0111\u00e2y ph\u00e2n t\u00edch c\u00e1c th\u00e0nh ph\u1ea7n d\u1eef li\u1ec7u ch\u00ednh, t\u1eeb kh\u00f3a \u0111\u1ecbnh d\u1ea1ng v\u00e0 thu\u1ed9c t\u00ednh k\u1ebft n\u1ed1i \u0111\u01b0\u1ee3c s\u1eed d\u1ee5ng \u0111\u1ec3 x\u00e2y d\u1ef1ng b\u1ea3n \u0111\u1ed3 kh\u00f4ng gian l\u00e0m vi\u1ec7c ki\u1ebfn tr\u00fac trong Mermaid.js.<\/p>\n<table border=\"1\" cellpadding=\"5\" cellspacing=\"0\">\n<thead>\n<tr>\n<th>Th\u00e0nh ph\u1ea7n c\u00fa ph\u00e1p<\/th>\n<th>Y\u00eau c\u1ea7u ki\u1ec3u<\/th>\n<th>M\u00f4 t\u1ea3 v\u00e0 quy t\u1eafc s\u1eed d\u1ee5ng<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>Khai b\u00e1o<\/strong><\/td>\n<td>\u0110\u1ecbnh danh t\u1eeb kh\u00f3a<\/td>\n<td>Kh\u1edfi t\u1ea1o b\u1ea3ng v\u1ebd kh\u00f4ng gian l\u00e0m vi\u1ec7c b\u1ea3n \u0111\u1ed3 h\u1ea1 t\u1ea7ng. Ph\u1ea3i s\u1eed d\u1ee5ng ch\u00ednh x\u00e1c <code>ki\u1ebfn tr\u00fac-beta<\/code> kh\u1ed1i.<\/td>\n<\/tr>\n<tr>\n<td><strong>N\u00fat d\u1ecbch v\u1ee5<\/strong><\/td>\n<td>T\u1eeb kh\u00f3a + Kh\u1ed1i nh\u1eadn di\u1ec7n<\/td>\n<td>Khai b\u00e1o m\u1ed9t th\u1ef1c th\u1ec3 ki\u1ebfn tr\u00fac. S\u1eed d\u1ee5ng c\u00fa ph\u00e1p: <code>d\u1ecbch v\u1ee5 id(icon)[Nh\u00e3n hi\u1ec3n th\u1ecb]<\/code>.<\/td>\n<\/tr>\n<tr>\n<td><strong>Bao b\u1ecdc nh\u00f3m<\/strong><\/td>\n<td>T\u1eeb kh\u00f3a ch\u1ee9a<\/td>\n<td>Nh\u00f3m c\u00e1c d\u1ecbch v\u1ee5 li\u00ean quan b\u00ean trong m\u1ed9t container tr\u1ef1c quan. S\u1eed d\u1ee5ng c\u00fa ph\u00e1p: <code>nh\u00f3m id(icon)[Nh\u00e3n nh\u00f3m]<\/code>.<\/td>\n<\/tr>\n<tr>\n<td><strong>T\u1eeb kh\u00f3a Trong<\/strong><\/td>\n<td>To\u00e1n t\u1eed g\u00e1n<\/td>\n<td>G\u00e1n r\u00f5 r\u00e0ng m\u1ed9t n\u00fat d\u1ecbch v\u1ee5 \u0111\u1ec3 n\u1eb1m b\u00ean trong m\u1ed9t bao b\u1ecdc nh\u00f3m \u0111\u00e3 khai b\u00e1o c\u1ee5 th\u1ec3: <code>d\u1ecbch v\u1ee5 id(icon)[Nh\u00e3n] trong groupId<\/code>.<\/td>\n<\/tr>\n<tr>\n<td><strong>N\u00fat giao \u0111i\u1ec3m<\/strong><\/td>\n<td>Tr\u00ecnh x\u00e1c \u0111\u1ecbnh t\u1eeb kh\u00f3a<\/td>\n<td>Thi\u1ebft l\u1eadp m\u1ed9t \u0111i\u1ec3m trung t\u00e2m \u0111\u1ecbnh h\u01b0\u1edbng c\u1ea5u tr\u00fac d\u00f9ng \u0111\u1ec3 \u0111\u1ecbnh tuy\u1ebfn g\u1ecdn g\u00e0ng c\u00e1c \u0111\u01b0\u1eddng n\u1ed1i ph\u1ee9c t\u1ea1p, \u0111a h\u01b0\u1edbng: <code>id giao \u0111i\u1ec3m<\/code>.<\/td>\n<\/tr>\n<tr>\n<td><strong>C\u1ea1nh k\u1ebft n\u1ed1i<\/strong><\/td>\n<td>To\u00e1n t\u1eed h\u01b0\u1edbng c\u1ed5ng<\/td>\n<td>C\u1ea5u h\u00ecnh c\u00e1c \u0111\u01b0\u1eddng theo d\u00f5i \u0111\u1ecbnh h\u01b0\u1edbng b\u1eb1ng c\u00e1ch c\u1ed1 \u0111\u1ecbnh \u0111\u01b0\u1eddng n\u1ed1i v\u00e0o c\u00e1c c\u1ea1nh c\u1ee5 th\u1ec3 c\u1ee7a n\u00fat (T, B, L, R): <code>ngu\u1ed3n:side -- side:\u0111\u00edch<\/code>. H\u1ed7 tr\u1ee3 \u0111\u1ea7u m\u0169i t\u00ean \u0111\u1ecbnh h\u01b0\u1edbng (<code>--&gt;<\/code>).<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<h2>Nh\u00f3m n\u00e2ng cao v\u00e0 \u0111\u1ecbnh tuy\u1ebfn c\u1ea1nh c\u1ed5ng<\/h2>\n<p>\u0110\u1ec3 ki\u1ec3m so\u00e1t ch\u00ednh x\u00e1c c\u00e1ch c\u00e1c li\u00ean k\u1ebft di chuy\u1ec3n gi\u1eefa c\u00e1c th\u00e0nh ph\u1ea7n m\u00e0 kh\u00f4ng g\u00e2y l\u1ed9n x\u1ed9n, b\u1ed9 x\u1eed l\u00fd ki\u1ebfn tr\u00fac y\u00eau c\u1ea7u c\u00e1c k\u1ebft n\u1ed1i c\u1ed5ng r\u00f5 r\u00e0ng. C\u00e1c n\u00fat li\u00ean quan c\u00f3 th\u1ec3 \u0111\u01b0\u1ee3c t\u1ed5 ch\u1ee9c b\u00ean trong c\u00e1c nh\u00f3m c\u1ea5u tr\u00fac \u0111\u1ec3 l\u00e0m r\u00f5 ranh gi\u1edbi h\u1ec7 th\u1ed1ng.<\/p>\n<h3>1. Quy t\u1eafc k\u1ebft n\u1ed1i c\u1ed5ng ch\u00ednh x\u00e1c<\/h3>\n<p>B\u1ea1n x\u00e1c \u0111\u1ecbnh n\u01a1i m\u1ed9t \u0111\u01b0\u1eddng k\u1ebft n\u1ed1i r\u1eddi kh\u1ecfi v\u00e0 \u0111i v\u00e0o m\u1ed9t th\u00e0nh ph\u1ea7n b\u1eb1ng c\u00e1ch th\u00eam d\u1ea5u hai ch\u1ea5m v\u00e0 c\u1edd h\u01b0\u1edbng c\u1ea1nh (&#8220;<code>T<\/code>, <code>D<\/code>, <code>Tr<\/code>, <code>Ph<\/code>) v\u00e0o c\u00e1c \u0111\u1ecbnh danh n\u00fat t\u01b0\u01a1ng \u1ee9ng:<\/p>\n<ul>\n<li><code>db:Ph -- Tr:server<\/code> : \u0110\u01b0\u1eddng n\u1ed1i r\u1eddi kh\u1ecfi **Ph\u1ea3i** c\u1ee7a c\u01a1 s\u1edf d\u1eef li\u1ec7u v\u00e0 \u0111i v\u00e0o **Tr\u00e1i** c\u1ee7a m\u00e1y ch\u1ee7 d\u01b0\u1edbi d\u1ea1ng \u0111\u01b0\u1eddng th\u1eb3ng ngang.<\/li>\n<li><code>db:T -- Tr:server<\/code> : \u0110\u01b0\u1eddng n\u1ed1i r\u1eddi kh\u1ecfi **Tr\u00ean** c\u1ee7a c\u01a1 s\u1edf d\u1eef li\u1ec7u v\u00e0 \u0111i v\u00e0o **Tr\u00e1i** c\u1ee7a m\u00e1y ch\u1ee7, u\u1ed1n cong t\u1ef1 \u0111\u1ed9ng t\u1ea1i g\u00f3c khu\u1ef7u 90\u00b0 g\u1ecdn g\u00e0ng.<\/li>\n<li><code>src:D --&gt; T:proc<\/code> : \u0110\u01b0\u1eddng n\u1ed1i r\u1eddi kh\u1ecfi **D\u01b0\u1edbi** c\u1ee7a n\u00fat ngu\u1ed3n v\u00e0 \u0111i xu\u1ed1ng v\u00e0o **Tr\u00ean** c\u1ee7a b\u1ed9 x\u1eed l\u00fd v\u1edbi \u0111\u1ea7u m\u0169i t\u00ean \u0111\u1ecbnh h\u01b0\u1edbng.<\/li>\n<\/ul>\n<h3>2. C\u1ea5u tr\u00fac h\u1ec7 th\u1ed1ng b\u1eb1ng c\u00e1c nh\u00f3m<\/h3>\n<p>\u0110\u1ec3 khai b\u00e1o m\u1ed9t nh\u00f3m tr\u1ef1c quan (nh\u01b0 m\u1ed9t m\u1ea1ng ri\u00eang \u1ea3o ho\u1eb7c c\u1ee5m c\u01a1 s\u1edf d\u1eef li\u1ec7u), h\u00e3y s\u1eed d\u1ee5ng t\u1eeb kh\u00f3a <code>group<\/code> v\u00e0 g\u00e1n c\u00e1c n\u00fat v\u00e0o n\u00f3 th\u00f4ng qua t\u1eeb kh\u00f3a <code>in<\/code> s\u1eeda \u0111\u1ed5i:<\/p>\n<div class=\"vpascode-viewer-container vpascode-fancy-active\">\n<div class=\"vpascode-header\">\n<span class=\"vpascode-lang-label\">Mermaid<\/span>\n<a class=\"vpascode-fancy-btn\" href=\"https:\/\/www.vpascode.com\/editor\/#mermaid:eNplzLEKg0AQhOE+kHeYUgsfIkgKG7EXi8vdokvk9lj39PXjpQlJyg\/mH6d+YSNvWal5kLnrBZhVcoJfJYee7BB9Vm\/U46C8OyO0hVPZAhvpzp7gsi1VAWk93k6gl0ATOH5d\/USJP83Q4R5DEo62\/XUvCxQ8Fg==\" rel=\"noopener noreferrer\" target=\"_blank\">\n<svg fill=\"none\" height=\"14\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2.5\" style=\"margin-right: 8px;\" viewbox=\"0 0 24 24\" width=\"14\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg>\n<span>Ch\u1ec9nh s\u1eeda Mermaid trong VPasCode<\/span>\n<\/a>\n<\/div>\n<div class=\"vpascode-code-wrapper\">\n            <div class=\"vpascode-viewer-container vpascode-fancy-active\">\r\n                                <div class=\"vpascode-header\">\r\n                    <span class=\"vpascode-lang-label\">Mermaid<\/span>\r\n                    <a href=\"https:\/\/www.vpascode.com\/editor\/#mermaid:eNpLLErOyCxJTS4pLUrVTUotSeTlUlBIL8ovLVBIzskvTfFLLSnPL8rWAHM0o30f7lqYl65QlHl4FZB6uGtxfixIg4JCcWpRWWZyqkJiaUmGBoiTWqQZ7Xd4V4lCxOGFyQolGQ93b0yOVcjMQzEWTW9BJlzrkQmZD3c35yoklz7cPTFTwTHAE0MzAMLXSaE=\" \r\n                       target=\"_blank\" \r\n                       rel=\"noopener noreferrer\" \r\n                       class=\"vpascode-fancy-btn\">\r\n                        <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" style=\"margin-right: 8px;\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg>\r\n                        <span>Edit Mermaid in VPasCode<\/span>\r\n                    <\/a>\r\n                <\/div>\r\n                                <div class=\"vpascode-code-wrapper\">\r\n                    <pre class=\"lang-mermaid\"><code class=\"language-mermaid\" data-language=\"mermaid\" class=\"language-mermaid\">architecture-beta\r\n  group cloudNetwork(cloud)[M\u1ea1ng ri\u00eang \u1ea3o]\r\n    service auth(server)[N\u00fat X\u00e1c th\u1ef1c] in cloudNetwork\r\n    service api(server)[\u0110i\u1ec3m cu\u1ed1i API] in cloudNetwork<\/code><\/pre>                <\/div>\r\n                <div class=\"vpascode-actions\">\r\n                    <a href=\"https:\/\/www.vpascode.com\/editor\/#mermaid:eNpLLErOyCxJTS4pLUrVTUotSeTlUlBIL8ovLVBIzskvTfFLLSnPL8rWAHM0o30f7lqYl65QlHl4FZB6uGtxfixIg4JCcWpRWWZyqkJiaUmGBoiTWqQZ7Xd4V4lCxOGFyQolGQ93b0yOVcjMQzEWTW9BJlzrkQmZD3c35yoklz7cPTFTwTHAE0MzAMLXSaE=\" \r\n                       target=\"_blank\" \r\n                       rel=\"noopener noreferrer\" \r\n                       class=\"vpascode-fancy-btn\">\r\n                        <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" style=\"margin-right: 6px;\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg>\r\n                        <span>Edit Mermaid in VPasCode<\/span>\r\n                    <\/a>\r\n                <\/div>\r\n            <\/div>\r\n             <\/div>\n<div class=\"vpascode-actions\">\n<a class=\"vpascode-fancy-btn\" href=\"https:\/\/www.vpascode.com\/editor\/#mermaid:eNplzLEKg0AQhOE+kHeYUgsfIkgKG7EXi8vdokvk9lj39PXjpQlJyg\/mH6d+YSNvWal5kLnrBZhVcoJfJYee7BB9Vm\/U46C8OyO0hVPZAhvpzp7gsi1VAWk93k6gl0ATOH5d\/USJP83Q4R5DEo62\/XUvCxQ8Fg==\" rel=\"noopener noreferrer\" target=\"_blank\">\n<svg fill=\"none\" height=\"14\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2.5\" style=\"margin-right: 6px;\" viewbox=\"0 0 24 24\" width=\"14\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg>\n<span>Ch\u1ec9nh s\u1eeda Mermaid trong VPasCode<\/span>\n<\/a>\n<\/div>\n<\/div>\n<p id=\"qjPpzIX\"><img alt=\"\" class=\"alignnone size-full wp-image-952\" decoding=\"async\" height=\"426\" sizes=\"(max-width: 421px) 100vw, 421px\" src=\"https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/07\/img_6a4de84220afd.png\" srcset=\"https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/07\/img_6a4de84220afd.png 421w, https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/07\/img_6a4de84220afd-296x300.png 296w\" width=\"421\"\/><\/p>\n<hr \/>\n<h2>C\u0103n ch\u1ec9nh c\u00e1c ph\u1ea7n t\u1eed anh em (v11.16.0+)<\/h2>\n<p>Khi nhi\u1ec1u d\u1ecbch v\u1ee5 kh\u00e1c nhau chia s\u1ebb c\u00f9ng m\u1ed9t h\u00e0nh tr\u00ecnh \u0111\u1ecbnh tuy\u1ebfn c\u1ea1nh (v\u00ed d\u1ee5: ba ngu\u1ed3n d\u1eef li\u1ec7u t\u00e1ch bi\u1ec7t \u0111ang truy\u1ec1n d\u1eef li\u1ec7u v\u00e0o m\u1ed9t b\u1ed9 x\u1eed l\u00fd tin nh\u1eafn duy nh\u1ea5t), thu\u1eadt to\u00e1n b\u1ed1 c\u1ee5c \u0111\u00f4i khi c\u00f3 th\u1ec3 nh\u00f3m ch\u00fang l\u1ea1i v\u1edbi nhau. T\u1eeb kh\u00f3a <code>align row<\/code> v\u00e0 <code>c\u0103n ch\u1ec9nh c\u1ed9t<\/code>c\u00e1c ch\u1ec9 th\u1ecb bu\u1ed9c \u0111\u1ed9ng c\u01a1 ph\u00e2n b\u1ed1 c\u00e1c ph\u1ea7n t\u1eed anh em \u0111\u00f3 \u0111\u1ec1u nhau d\u1ecdc theo m\u1ed9t tr\u1ee5c \u0111\u01b0\u1eddng nh\u1ea5t \u0111\u1ecbnh.<\/p>\n<div class=\"vpascode-viewer-container vpascode-fancy-active\">\n<div class=\"vpascode-header\">\n<span class=\"vpascode-lang-label\">Mermaid<\/span>\n<a class=\"vpascode-fancy-btn\" href=\"https:\/\/www.vpascode.com\/editor\/#mermaid:eNpLLErOyCxJTS4pLUrVTUotSeTlUlAoTi0qy0xOVSguSjbUAHFSizSjg\/NLi4BihrFoKozQVRihqCgoyk+GqwgAclKLi\/OLFDxKk4DKwAqBllg5Kejq2imEWIFUQwWN0ARBwok5mel5CkX55WBdYFUAUOU9GA==\" rel=\"noopener noreferrer\" target=\"_blank\">\n<svg fill=\"none\" height=\"14\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2.5\" style=\"margin-right: 8px;\" viewbox=\"0 0 24 24\" width=\"14\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg>\n<span>Ch\u1ec9nh s\u1eeda Mermaid trong VPasCode<\/span>\n<\/a>\n<\/div>\n<div class=\"vpascode-code-wrapper\">\n            <div class=\"vpascode-viewer-container vpascode-fancy-active\">\r\n                                <div class=\"vpascode-header\">\r\n                    <span class=\"vpascode-lang-label\">Mermaid<\/span>\r\n                    <a href=\"https:\/\/www.vpascode.com\/editor\/#mermaid:eNrLzny4a3+eQknR4V3JukmpJYm8XAoKxalFZZnJqQrFRcmGGiBOapFmtF966cPdk\/MUDGPRlBhhKDFCUVJQlJ8MVxJSVJqXrlByeFGuQsXD3WsVcg7vBSoGKwdaZuWkoKtrpxBiBdIDFTRCEwQJJx9pzlNIzni4uzMvQyHj8AKgkSDtYOUABr5K4g==\" \r\n                       target=\"_blank\" \r\n                       rel=\"noopener noreferrer\" \r\n                       class=\"vpascode-fancy-btn\">\r\n                        <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" style=\"margin-right: 8px;\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg>\r\n                        <span>Edit Mermaid in VPasCode<\/span>\r\n                    <\/a>\r\n                <\/div>\r\n                                <div class=\"vpascode-code-wrapper\">\r\n                    <pre class=\"lang-mermaid\"><code class=\"language-mermaid\" data-language=\"mermaid\" class=\"language-mermaid\">ki\u1ebfn tr\u00fac-beta\r\n  service src1(server)[Ngu\u1ed3n 1]\r\n  service src2(server)[Ngu\u1ed3n 2]\r\n  service proc(server)[Trung t\u00e2m x\u1eed l\u00fd]\r\n\r\n  src1:B --&gt; T:proc\r\n  src2:B --&gt; T:proc\r\n\r\n  c\u0103n ch\u1ec9nh h\u00e0ng src1 src2<\/code><\/pre>                <\/div>\r\n                <div class=\"vpascode-actions\">\r\n                    <a href=\"https:\/\/www.vpascode.com\/editor\/#mermaid:eNrLzny4a3+eQknR4V3JukmpJYm8XAoKxalFZZnJqQrFRcmGGiBOapFmtF966cPdk\/MUDGPRlBhhKDFCUVJQlJ8MVxJSVJqXrlByeFGuQsXD3WsVcg7vBSoGKwdaZuWkoKtrpxBiBdIDFTRCEwQJJx9pzlNIzni4uzMvQyHj8AKgkSDtYOUABr5K4g==\" \r\n                       target=\"_blank\" \r\n                       rel=\"noopener noreferrer\" \r\n                       class=\"vpascode-fancy-btn\">\r\n                        <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" style=\"margin-right: 6px;\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg>\r\n                        <span>Edit Mermaid in VPasCode<\/span>\r\n                    <\/a>\r\n                <\/div>\r\n            <\/div>\r\n             <\/div>\n<div class=\"vpascode-actions\">\n<a class=\"vpascode-fancy-btn\" href=\"https:\/\/www.vpascode.com\/editor\/#mermaid:eNpLLErOyCxJTS4pLUrVTUotSeTlUlAoTi0qy0xOVSguSjbUAHFSizSjg\/NLi4BihrFoKozQVRihqCgoyk+GqwgAclKLi\/OLFDxKk4DKwAqBllg5Kejq2imEWIFUQwWN0ARBwok5mel5CkX55WBdYFUAUOU9GA==\" rel=\"noopener noreferrer\" target=\"_blank\">\n<svg fill=\"none\" height=\"14\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2.5\" style=\"margin-right: 6px;\" viewbox=\"0 0 24 24\" width=\"14\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg>\n<span>Ch\u1ec9nh s\u1eeda Mermaid trong VPasCode<\/span>\n<\/a>\n<\/div>\n<\/div>\n<p id=\"hQkpsXk\"><img alt=\"\" class=\"alignnone size-full wp-image-953\" decoding=\"async\" height=\"373\" sizes=\"(max-width: 341px) 100vw, 341px\" src=\"https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/07\/img_6a4de84be165b.png\" srcset=\"https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/07\/img_6a4de84be165b.png 341w, https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/07\/img_6a4de84be165b-274x300.png 274w\" width=\"341\"\/><\/p>\n<hr \/>\n<h2>B\u1ea3n thi\u1ebft k\u1ebf th\u1ef1c t\u1ebf: B\u1ea3n thi\u1ebft k\u1ebf c\u1ee5m Microservice<\/h2>\n<p>B\u1ea3n thi\u1ebft k\u1ebf n\u00e0y minh h\u1ecda m\u1ed9t ki\u1ebfn tr\u00fac \u0111\u00e1m m\u00e2y c\u1ea5p doanh nghi\u1ec7p, r\u1ea5t b\u1ec1n b\u1ec9. B\u1eb1ng c\u00e1ch \u0111\u1eb7t \u0111\u1ed9ng c\u01a1 API ch\u00ednh \u1edf trung t\u00e2m v\u00e0 ph\u00e2n nh\u00e1nh x\u00e1c th\u1ef1c c\u0169ng nh\u01b0 c\u00e1c t\u00e1c v\u1ee5 b\u1ea5t \u0111\u1ed3ng b\u1ed9 theo chi\u1ec1u ngang sang hai b\u00ean, b\u1ed1 c\u1ee5c t\u1eadn d\u1ee5ng c\u00e1c nguy\u00ean t\u1eafc thi\u1ebft k\u1ebf \u0111\u1ed1i x\u1ee9ng \u0111\u1ec3 tr\u00e1nh c\u00e1c \u0111\u01b0\u1eddng ch\u1ed3ng ch\u00e9o. To\u00e0n b\u1ed9 lu\u1ed3ng d\u1eef li\u1ec7u di chuy\u1ec3n m\u1ed9t c\u00e1ch c\u00f3 th\u1ec3 d\u1ef1 \u0111o\u00e1n t\u1eeb c\u1ed5ng c\u00f4ng c\u1ed9ng xu\u1ed1ng l\u1edbp l\u01b0u tr\u1eef d\u1eef li\u1ec7u \u0111\u01b0\u1ee3c s\u1eafp x\u1ebfp g\u1ecdn g\u00e0ng, s\u1eed d\u1ee5ng c\u1eb7p<code>c\u0103n ch\u1ec9nh h\u00e0ng<\/code>c\u00e1c ch\u1ec9 th\u1ecb \u0111\u1ec3 c\u1ed1 \u0111\u1ecbnh c\u00e1c th\u00e0nh ph\u1ea7n v\u00e0o c\u00e1c \u0111\u01b0\u1eddng ngang s\u1eafc n\u00e9t, c\u00f3 th\u1ec3 d\u1ef1 \u0111o\u00e1n.<\/p>\n<div class=\"vpascode-viewer-container vpascode-fancy-active\">\n<div class=\"vpascode-header\">\n<span class=\"vpascode-lang-label\">Mermaid<\/span>\n<a class=\"vpascode-fancy-btn\" href=\"https:\/\/www.vpascode.com\/editor\/#mermaid:eNp9U01vGjEQvUfKfxhFigQHkNreOFTaUNJUJRUFVA6Ig9mdXSyMvRp7Idtf37EBr0OkHoBhPB\/P7z0LynfSYe4awsEWnbi\/A3DSKYSHF1ntBtlRSCW2UknXwqvMyViko8wRsqT14f7ONz4+wuTNIWmhYKIdtbCUSP7k2pQr0xSlEoQ9qX0luv56HJOwyp43ab1Q256PkfrrbLWArK6VzIWTRsPUiAKehBI6R9pEBGPDc9K6sWqsO8OoyDQ1iLq+5HoBT3\/9KrSosIDJz8W7S9oAJoHTuN3iHHewOAeX5AakTsbfNNfytveMdfaD2aqk\/n\/7ydAe6ZcpktW21Tkshd3DKpx+GHDhZIE5q1TAwhnii0ZZznwUwokrIT7eCov99YyMV5e7vnEOpqINLKeQeKS0Pf7s++u5j2Es8h1eGQ9okuHvm2tjXUVo05Xn1OL3FGYkD4LajyMuN\/o0hD9IjjVW8KzMaQRLEmUpc8BgvJLMAepmyy6Awpw0OAO5OdSNk7riiNAP6uw4eoLB4CssR+w4f8I\/XSoKF9d\/HsKLIfnXaBcBRDG3xJbc+T0KSwdCF0D8lhzY9nBARx60asOWOHk0Dcvmo8RiNxXzUDEddUaIcL4M+SFYVOyhCxh+ABfHWCjI1LWHE4goJLGsqmVmmRMWoOa\/8oiBZrDKOBsWdzgiEUFvf9hBiGdXOSMmNoxpHGRvbItMyUofWBkLpSEQMEMqeS18J1mErzPnXAVkTunyhAFIb56WB1zRUP8A3q2fEg==\" rel=\"noopener noreferrer\" target=\"_blank\">\n<svg fill=\"none\" height=\"14\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2.5\" style=\"margin-right: 8px;\" viewbox=\"0 0 24 24\" width=\"14\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg>\n<span>Ch\u1ec9nh s\u1eeda Mermaid trong VPasCode<\/span>\n<\/a>\n<\/div>\n<div class=\"vpascode-code-wrapper\">\n            <div class=\"vpascode-viewer-container vpascode-fancy-active\">\r\n                                <div class=\"vpascode-header\">\r\n                    <span class=\"vpascode-lang-label\">Mermaid<\/span>\r\n                    <a href=\"https:\/\/www.vpascode.com\/editor\/#mermaid:eNqFVE1r20AQvQfyH4ZAwDmk0PamQyFWWihxQxobUgg5yGvVK6zsqqtVmnsPofQSk1PJoXFDCP0ITWh78VJ6kPH\/2H\/SmbUtySbQg\/GyM\/vmzZs36kV2+FeAVvmQrbdDHSwvAehIxyGsbFVi8CJiSqahOopYCFvcDi+hY82V6IIfyJXlJXq3ugotO7zGu1Ef\/zM4yi8ktPOvAkRX5hcRJc0wWCyzzus4UGEtEjpUItRr+35xCXsbzw6q+UHcrtE5VJiWfxbQtsM7LKWRSgTWfMHzlNHGXvOgYOTj3eF8nFnT1xDnvx2hrpJZAkGS+HGWIpGaY7a2P9fx060mNjW+teaSwZsMawoE+OMYVjhmmjcn54LrpjUfGIcjLA2v8gEDza25Yweoq0QuZd0FqCRaRBqdWvOR6I8HsLHzHHye3wj+P6C3UvVCtS07JVBL5d8Fh2NrbqgJ2OaRNSeHE451O7zSNEBzhqhtLHlfhflxx+PbDJOs+VGKhOO5lAR5UorcCXQwU5nO7SAN1\/Yb1pwnsEmvYyKSweh0ClIvQBaUVmEnSmv466Eb3ITryBQEanvuyGM7u5QzI18pPY+UyFR3VZhWCPmIcg07k0DzZeNejKkCDx9AI5to1cKt+DkxP7nNm2vJrYK25huw\/NfEgzTLY3zbJwXRjKBpnqBlPhCEXm6IV4f19SfQ8nAJKIJ\/5VVhlILTo5LTdjcgJmQX5uwCCaflERyLcEgD2iCVDyIiiDG3TNRAPyJ\/YBuuXlHDa7iyu17F6gsZuy6j4ZXGK4g9Lon5aOLUmk8e+G4pFiw5t69qjPz0VN2ZYoye9XhISYXKenw7HmCwZF7SLBRz3qFgybCIzdxQfj5G7wRKZ817Gg1a\/Iqsbfo0QDwyLuEQR6lpB9B7EXD80AkgIaUbYvU9x1C3yqmiG1T1uved41349R+dXFgw\" \r\n                       target=\"_blank\" \r\n                       rel=\"noopener noreferrer\" \r\n                       class=\"vpascode-fancy-btn\">\r\n                        <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" style=\"margin-right: 8px;\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg>\r\n                        <span>Edit Mermaid in VPasCode<\/span>\r\n                    <\/a>\r\n                <\/div>\r\n                                <div class=\"vpascode-code-wrapper\">\r\n                    <pre class=\"lang-mermaid\"><code class=\"language-mermaid\" data-language=\"mermaid\" class=\"language-mermaid\">ki\u1ebfn tr\u00fac-beta\r\n  title \"Ki\u1ebfn tr\u00fac Microservice Kh\u1ea3 d\u1ee5ng Cao\"\r\n\r\n  %% T\u1ea7ng \u0111\u1ea7u v\u00e0o b\u00ean ngo\u00e0i\r\n  service cloudflare(internet)[Cloudflare WAF]\r\n  service alb(server)[C\u00e2n b\u1eb1ng t\u1ea3i \u1ee9ng d\u1ee5ng AWS]\r\n\r\n  %% C\u1ee5m \u1ee9ng d\u1ee5ng c\u1ed1t l\u00f5i\r\n  group appCluster(cloud)[Microservice EKS \u0111\u01b0\u1ee3c qu\u1ea3n l\u00fd]\r\n    service authService(server)[D\u1ecbch v\u1ee5 X\u00e1c th\u1ef1c] trong appCluster\r\n    service apiService(server)[\u0110\u1ed9ng c\u01a1 API Ch\u00ednh] trong appCluster\r\n    service workerNode(server)[Tr\u00ecnh x\u1eed l\u00fd Nhi\u1ec7m v\u1ee5 B\u1ea5t \u0111\u1ed3ng b\u1ed9] trong appCluster\r\n\r\n  %% T\u1ea7ng l\u01b0u tr\u1eef \u0111\u01b0\u1ee3c b\u1ea3o v\u1ec7\r\n  group dataCluster(database)[L\u1edbp D\u1eef li\u1ec7u \u0110\u01b0\u1ee3c B\u1ea3o v\u1ec7]\r\n    service redis(disk)[C\u1ee5m B\u1ed9 nh\u1edb \u0111\u1ec7m Redis] trong dataCluster\r\n    service postgres(database)[Ch\u1ee7 PostgreSQL] trong dataCluster\r\n\r\n  %% 1. Lu\u1ed3ng Th\u1eb3ng \u0111\u1ee9ng: D\u1eef li\u1ec7u v\u00e0o t\u1eeb c\u00f4ng c\u1ed9ng xu\u1ed1ng l\u00f5i t\u00ednh to\u00e1n\r\n  cloudflare:B --&gt; T:alb\r\n  alb:B --&gt; T:apiService\r\n\r\n  %% 2. Lu\u1ed3ng Ngang: API ch\u00ednh ph\u00e2n nh\u00e1nh sang tr\u00e1i v\u00e0 ph\u1ea3i \u0111\u1ed1i x\u1ee9ng\r\n  apiService:L --&gt; R:authService\r\n  apiService:R --&gt; L:workerNode\r\n\r\n  %% 3. Lu\u1ed3ng C\u01a1 s\u1edf: C\u00e1c tr\u00ecnh x\u1eed l\u00fd \u1ee9ng d\u1ee5ng r\u01a1i th\u1eb3ng xu\u1ed1ng c\u00e1c khe d\u1eef li\u1ec7u t\u01b0\u01a1ng \u1ee9ng\r\n  authService:B --&gt; T:redis\r\n  workerNode:B --&gt; T:postgres\r\n\r\n  %% C\u0103n ch\u1ec9nh tr\u1ee5c b\u1ed1 c\u1ee5c cho m\u1ed9t l\u01b0\u1edbi ho\u00e0n h\u1ea3o\r\n  c\u0103n ch\u1ec9nh h\u00e0ng authService apiService workerNode\r\n  c\u0103n ch\u1ec9nh h\u00e0ng redis postgres<\/code><\/pre>                <\/div>\r\n                <div class=\"vpascode-actions\">\r\n                    <a href=\"https:\/\/www.vpascode.com\/editor\/#mermaid:eNqFVE1r20AQvQfyH4ZAwDmk0PamQyFWWihxQxobUgg5yGvVK6zsqqtVmnsPofQSk1PJoXFDCP0ITWh78VJ6kPH\/2H\/SmbUtySbQg\/GyM\/vmzZs36kV2+FeAVvmQrbdDHSwvAehIxyGsbFVi8CJiSqahOopYCFvcDi+hY82V6IIfyJXlJXq3ugotO7zGu1Ef\/zM4yi8ktPOvAkRX5hcRJc0wWCyzzus4UGEtEjpUItRr+35xCXsbzw6q+UHcrtE5VJiWfxbQtsM7LKWRSgTWfMHzlNHGXvOgYOTj3eF8nFnT1xDnvx2hrpJZAkGS+HGWIpGaY7a2P9fx060mNjW+teaSwZsMawoE+OMYVjhmmjcn54LrpjUfGIcjLA2v8gEDza25Yweoq0QuZd0FqCRaRBqdWvOR6I8HsLHzHHye3wj+P6C3UvVCtS07JVBL5d8Fh2NrbqgJ2OaRNSeHE451O7zSNEBzhqhtLHlfhflxx+PbDJOs+VGKhOO5lAR5UorcCXQwU5nO7SAN1\/Yb1pwnsEmvYyKSweh0ClIvQBaUVmEnSmv466Eb3ITryBQEanvuyGM7u5QzI18pPY+UyFR3VZhWCPmIcg07k0DzZeNejKkCDx9AI5to1cKt+DkxP7nNm2vJrYK25huw\/NfEgzTLY3zbJwXRjKBpnqBlPhCEXm6IV4f19SfQ8nAJKIJ\/5VVhlILTo5LTdjcgJmQX5uwCCaflERyLcEgD2iCVDyIiiDG3TNRAPyJ\/YBuuXlHDa7iyu17F6gsZuy6j4ZXGK4g9Lon5aOLUmk8e+G4pFiw5t69qjPz0VN2ZYoye9XhISYXKenw7HmCwZF7SLBRz3qFgybCIzdxQfj5G7wRKZ817Gg1a\/Iqsbfo0QDwyLuEQR6lpB9B7EXD80AkgIaUbYvU9x1C3yqmiG1T1uved41349R+dXFgw\" \r\n                       target=\"_blank\" \r\n                       rel=\"noopener noreferrer\" \r\n                       class=\"vpascode-fancy-btn\">\r\n                        <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" style=\"margin-right: 6px;\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg>\r\n                        <span>Edit Mermaid in VPasCode<\/span>\r\n                    <\/a>\r\n                <\/div>\r\n            <\/div>\r\n             <\/div>\n<div class=\"vpascode-actions\">\n<a class=\"vpascode-fancy-btn\" href=\"https:\/\/www.vpascode.com\/editor\/#mermaid:eNp9U01vGjEQvUfKfxhFigQHkNreOFTaUNJUJRUFVA6Ig9mdXSyMvRp7Idtf37EBr0OkHoBhPB\/P7z0LynfSYe4awsEWnbi\/A3DSKYSHF1ntBtlRSCW2UknXwqvMyViko8wRsqT14f7ONz4+wuTNIWmhYKIdtbCUSP7k2pQr0xSlEoQ9qX0luv56HJOwyp43ab1Q256PkfrrbLWArK6VzIWTRsPUiAKehBI6R9pEBGPDc9K6sWqsO8OoyDQ1iLq+5HoBT3\/9KrSosIDJz8W7S9oAJoHTuN3iHHewOAeX5AakTsbfNNfytveMdfaD2aqk\/n\/7ydAe6ZcpktW21Tkshd3DKpx+GHDhZIE5q1TAwhnii0ZZznwUwokrIT7eCov99YyMV5e7vnEOpqINLKeQeKS0Pf7s++u5j2Es8h1eGQ9okuHvm2tjXUVo05Xn1OL3FGYkD4LajyMuN\/o0hD9IjjVW8KzMaQRLEmUpc8BgvJLMAepmyy6Awpw0OAO5OdSNk7riiNAP6uw4eoLB4CssR+w4f8I\/XSoKF9d\/HsKLIfnXaBcBRDG3xJbc+T0KSwdCF0D8lhzY9nBARx60asOWOHk0Dcvmo8RiNxXzUDEddUaIcL4M+SFYVOyhCxh+ABfHWCjI1LWHE4goJLGsqmVmmRMWoOa\/8oiBZrDKOBsWdzgiEUFvf9hBiGdXOSMmNoxpHGRvbItMyUofWBkLpSEQMEMqeS18J1mErzPnXAVkTunyhAFIb56WB1zRUP8A3q2fEg==\" rel=\"noopener noreferrer\" target=\"_blank\">\n<svg fill=\"none\" height=\"14\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2.5\" style=\"margin-right: 6px;\" viewbox=\"0 0 24 24\" width=\"14\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg>\n<span>Ch\u1ec9nh s\u1eeda Mermaid trong VPasCode<\/span>\n<\/a>\n<\/div>\n<\/div>\n<p id=\"GIZsjsG\"><img loading=\"lazy\" alt=\"\" class=\"alignnone size-full wp-image-955\" decoding=\"async\" height=\"674\" loading=\"lazy\" sizes=\"auto, (max-width: 981px) 100vw, 981px\" src=\"https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/07\/img_6a4de9305d5c4.png\" srcset=\"https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/07\/img_6a4de9305d5c4.png 981w, https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/07\/img_6a4de9305d5c4-300x206.png 300w, https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/07\/img_6a4de9305d5c4-768x528.png 768w\" width=\"981\"\/><\/p>\n<hr \/>\n<h2>Nh\u1eefng sai l\u1ea7m ph\u1ed5 bi\u1ebfn v\u1ec1 c\u00fa ph\u00e1p &amp; Gi\u1edbi h\u1ea1n h\u1ec7 th\u1ed1ng<\/h2>\n<p>Khi vi\u1ebft m\u00e3 c\u01a1 s\u1edf h\u1ea1 t\u1ea7ng, h\u00e3y ghi nh\u1edb nh\u1eefng quy t\u1eafc x\u00e1c th\u1ef1c c\u1ea5u h\u00ecnh c\u1ee5 th\u1ec3 n\u00e0y \u0111\u1ec3 tr\u00e1nh l\u1ed7i ph\u00e2n t\u00edch c\u00fa ph\u00e1p:<\/p>\n<ul>\n<li><strong>Th\u1ee9 t\u1ef1 d\u1ea5u ngo\u1eb7c cho nh\u00e3n:<\/strong>C\u00e1c chu\u1ed7i v\u0103n b\u1ea3n hi\u1ec3n th\u1ecb ph\u1ea3i s\u1eed d\u1ee5ng d\u1ea5u ngo\u1eb7c vu\u00f4ng<code>[V\u0103n b\u1ea3n Nh\u00e3n]<\/code>v\u00e0 ph\u1ea3i theo ngay sau d\u1ea5u ngo\u1eb7c bi\u1ec3u t\u01b0\u1ee3ng m\u00e0 kh\u00f4ng c\u00f3 kho\u1ea3ng tr\u1eafng: <code>service id(server)[Text]<\/code>l\u00e0 \u0111\u00fang. Vi\u1ec7c s\u1eed d\u1ee5ng d\u1ea5u ngo\u1eb7c k\u00e9p b\u00ean trong d\u1ea5u ngo\u1eb7c s\u1ebd l\u00e0m h\u1ecfng tr\u00ecnh ph\u00e2n t\u00edch c\u00fa ph\u00e1p.<\/li>\n<li><strong>\u0110\u1ed9 nh\u1ea1y ch\u1eef hoa ch\u1eef th\u01b0\u1eddng c\u1ee7a c\u1ed5ng:<\/strong>C\u00e1c \u0111i\u1ec3m neo c\u1ed5ng c\u1ea1nh k\u1ebft n\u1ed1i ph\u1ea3i \u0111\u01b0\u1ee3c vi\u1ebft b\u1eb1ng ch\u1eef hoa (<code>T<\/code>, <code>B<\/code>, <code>L<\/code>, <code>R<\/code>). C\u00e1c ch\u1eef c\u00e1i th\u01b0\u1eddng (<code>t<\/code>, <code>b<\/code>, <code>l<\/code>, <code>r<\/code>) kh\u00f4ng \u0111\u01b0\u1ee3c nh\u1eadn di\u1ec7n v\u00e0 s\u1ebd g\u00e2y l\u1ed7i khi t\u1ea1o b\u1ed1 c\u1ee5c.<\/li>\n<li><strong>Quy t\u1eafc khai b\u00e1o tr\u01b0\u1edbc:<\/strong> M\u1ecdi \u0111\u1ecbnh danh n\u00fat ho\u1eb7c giao \u0111i\u1ec3m \u0111\u01b0\u1ee3c s\u1eed d\u1ee5ng b\u00ean trong m\u1ed9t c\u00e2u l\u1ec7nh \u0111\u01b0\u1eddng \u0111i c\u1ea1nh ph\u1ea3i \u0111\u01b0\u1ee3c khai b\u00e1o r\u00f5 r\u00e0ng tr\u00ean m\u1ed9t d\u00f2ng ri\u00eang bi\u1ec7t ph\u00eda tr\u00ean n\u00f3. K\u1ebft n\u1ed1i v\u1edbi t\u00ean n\u00fat ng\u1ea7m \u0111\u1ecbnh s\u1ebd kh\u00f4ng th\u1ec3 x\u00e2y d\u1ef1ng \u0111\u01b0\u1ee3c.<\/li>\n<li><strong>Gi\u1edbi h\u1ea1n th\u00e0nh vi\u00ean c\u0103n ch\u1ec9nh:<\/strong> Khi s\u1eed d\u1ee5ng l\u1ec7nh <code>c\u0103n ch\u1ec9nh h\u00e0ng<\/code> ho\u1eb7c <code>c\u0103n ch\u1ec9nh c\u1ed9t<\/code> c\u00e1c ch\u1ec9 th\u1ecb \u0111\u1ecbnh v\u1ecb, b\u1ea1n ph\u1ea3i cung c\u1ea5p \u00edt nh\u1ea5t hai ho\u1eb7c nhi\u1ec1u h\u01a1n c\u00e1c \u0111\u1ecbnh danh d\u1ecbch v\u1ee5 ho\u1eb7c giao \u0111i\u1ec3m h\u1ee3p l\u1ec7 \u0111\u00e3 \u0111\u01b0\u1ee3c khai b\u00e1o tr\u01b0\u1edbc \u0111\u00f3 tr\u00ean d\u00f2ng l\u1ec7nh.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"S\u01a1 \u0111\u1ed3 ki\u1ebfn tr\u00fac cung c\u1ea5p b\u1ea3n v\u1ebd c\u1ea5u tr\u00fac \u0111\u01b0\u1ee3c c\u00e1c ki\u1ebfn tr\u00fac s\u01b0 h\u1ec7 th\u1ed1ng v\u00e0 nh\u00f3m DevOps s\u1eed d\u1ee5ng \u0111\u1ec3 tr\u1ef1c quan h\u00f3a c\u00e1c thi\u1ebft l\u1eadp h\u1ea1 t\u1ea7ng, c\u00e1c d\u1ecbch v\u1ee5 vi m\u00f4 \u0111\u00e1m m\u00e2y v\u00e0 c\u1ea5u&#8230;","protected":false},"author":3,"featured_media":0,"parent":0,"menu_order":20,"template":"","meta":{"_yoast_wpseo_title":"Mermaid Architecture Diagram | VPasCode Text to Diagram Guide","_yoast_wpseo_metadesc":"Design cloud service infrastructure and system connections with Mermaid architecture diagrams in VPasCode, a diagram-as-code tool.","inline_featured_image":false,"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"source_url":"","fifu_image_url":"","fifu_image_alt":"","_fifu_image_alt":"","fifu_alt":"","_fifu_alt":"","fifu_image_title":"","_fifu_image_title":"","fifu_input_alt":"","vp_image_hash":""},"ld_collection":[14],"class_list":["post-2078","ld_docs","type-ld_docs","status-publish","hentry","ld_collection-vpascode-docs"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Mermaid Architecture Diagram | VPasCode Text to Diagram Guide<\/title>\n<meta name=\"description\" content=\"Design cloud service infrastructure and system connections with Mermaid architecture diagrams in VPasCode, a diagram-as-code tool.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.vpascode.com\/vn\/docs\/vpascode-docs\/mermaid-js-playbook\/mermaid-js-architecture-diagram-syntax-layout-guide\/\" \/>\n<meta property=\"og:locale\" content=\"vi_VN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Mermaid Architecture Diagram | VPasCode Text to Diagram Guide\" \/>\n<meta property=\"og:description\" content=\"Design cloud service infrastructure and system connections with Mermaid architecture diagrams in VPasCode, a diagram-as-code tool.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.vpascode.com\/vn\/docs\/vpascode-docs\/mermaid-js-playbook\/mermaid-js-architecture-diagram-syntax-layout-guide\/\" \/>\n<meta property=\"og:site_name\" content=\"VPasCode\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/07\/img_6a4de8359768b.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u01af\u1edbc t\u00ednh th\u1eddi gian \u0111\u1ecdc\" \/>\n\t<meta name=\"twitter:data1\" content=\"4 ph\u00fat\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/vn\\\/docs\\\/vpascode-docs\\\/mermaid-js-playbook\\\/mermaid-js-architecture-diagram-syntax-layout-guide\\\/\",\"url\":\"https:\\\/\\\/www.vpascode.com\\\/vn\\\/docs\\\/vpascode-docs\\\/mermaid-js-playbook\\\/mermaid-js-architecture-diagram-syntax-layout-guide\\\/\",\"name\":\"Mermaid Architecture Diagram | VPasCode Text to Diagram Guide\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/vn\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/vn\\\/docs\\\/vpascode-docs\\\/mermaid-js-playbook\\\/mermaid-js-architecture-diagram-syntax-layout-guide\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/vn\\\/docs\\\/vpascode-docs\\\/mermaid-js-playbook\\\/mermaid-js-architecture-diagram-syntax-layout-guide\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.vpascode.com\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/img_6a4de8359768b.png\",\"datePublished\":\"2026-07-08T05:51:38+00:00\",\"description\":\"Design cloud service infrastructure and system connections with Mermaid architecture diagrams in VPasCode, a diagram-as-code tool.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/vn\\\/docs\\\/vpascode-docs\\\/mermaid-js-playbook\\\/mermaid-js-architecture-diagram-syntax-layout-guide\\\/#breadcrumb\"},\"inLanguage\":\"vi\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.vpascode.com\\\/vn\\\/docs\\\/vpascode-docs\\\/mermaid-js-playbook\\\/mermaid-js-architecture-diagram-syntax-layout-guide\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"vi\",\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/vn\\\/docs\\\/vpascode-docs\\\/mermaid-js-playbook\\\/mermaid-js-architecture-diagram-syntax-layout-guide\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.vpascode.com\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/img_6a4de8359768b.png\",\"contentUrl\":\"https:\\\/\\\/www.vpascode.com\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/img_6a4de8359768b.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/vn\\\/docs\\\/vpascode-docs\\\/mermaid-js-playbook\\\/mermaid-js-architecture-diagram-syntax-layout-guide\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.vpascode.com\\\/vn\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Lean Docs\",\"item\":\"https:\\\/\\\/www.vpascode.com\\\/vn\\\/docs\\\/%ld_collection%\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"H\u01b0\u1edbng d\u1eabn c\u00fa ph\u00e1p v\u00e0 b\u1ed1 c\u1ee5c s\u01a1 \u0111\u1ed3 ki\u1ebfn tr\u00fac Mermaid.js\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/vn\\\/#website\",\"url\":\"https:\\\/\\\/www.vpascode.com\\\/vn\\\/\",\"name\":\"VPasCode\",\"description\":\"by Visual Paradigm\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/vn\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.vpascode.com\\\/vn\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"vi\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/vn\\\/#organization\",\"name\":\"VPasCode\",\"url\":\"https:\\\/\\\/www.vpascode.com\\\/vn\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"vi\",\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/vn\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.vpascode.com\\\/vn\\\/wp-content\\\/uploads\\\/sites\\\/12\\\/2026\\\/06\\\/cropped-vp-online-logo-v1.png\",\"contentUrl\":\"https:\\\/\\\/www.vpascode.com\\\/vn\\\/wp-content\\\/uploads\\\/sites\\\/12\\\/2026\\\/06\\\/cropped-vp-online-logo-v1.png\",\"width\":128,\"height\":138,\"caption\":\"VPasCode\"},\"image\":{\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/vn\\\/#\\\/schema\\\/logo\\\/image\\\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Mermaid Architecture Diagram | VPasCode Text to Diagram Guide","description":"Design cloud service infrastructure and system connections with Mermaid architecture diagrams in VPasCode, a diagram-as-code tool.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.vpascode.com\/vn\/docs\/vpascode-docs\/mermaid-js-playbook\/mermaid-js-architecture-diagram-syntax-layout-guide\/","og_locale":"vi_VN","og_type":"article","og_title":"Mermaid Architecture Diagram | VPasCode Text to Diagram Guide","og_description":"Design cloud service infrastructure and system connections with Mermaid architecture diagrams in VPasCode, a diagram-as-code tool.","og_url":"https:\/\/www.vpascode.com\/vn\/docs\/vpascode-docs\/mermaid-js-playbook\/mermaid-js-architecture-diagram-syntax-layout-guide\/","og_site_name":"VPasCode","og_image":[{"url":"https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/07\/img_6a4de8359768b.png","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_misc":{"\u01af\u1edbc t\u00ednh th\u1eddi gian \u0111\u1ecdc":"4 ph\u00fat"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.vpascode.com\/vn\/docs\/vpascode-docs\/mermaid-js-playbook\/mermaid-js-architecture-diagram-syntax-layout-guide\/","url":"https:\/\/www.vpascode.com\/vn\/docs\/vpascode-docs\/mermaid-js-playbook\/mermaid-js-architecture-diagram-syntax-layout-guide\/","name":"Mermaid Architecture Diagram | VPasCode Text to Diagram Guide","isPartOf":{"@id":"https:\/\/www.vpascode.com\/vn\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.vpascode.com\/vn\/docs\/vpascode-docs\/mermaid-js-playbook\/mermaid-js-architecture-diagram-syntax-layout-guide\/#primaryimage"},"image":{"@id":"https:\/\/www.vpascode.com\/vn\/docs\/vpascode-docs\/mermaid-js-playbook\/mermaid-js-architecture-diagram-syntax-layout-guide\/#primaryimage"},"thumbnailUrl":"https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/07\/img_6a4de8359768b.png","datePublished":"2026-07-08T05:51:38+00:00","description":"Design cloud service infrastructure and system connections with Mermaid architecture diagrams in VPasCode, a diagram-as-code tool.","breadcrumb":{"@id":"https:\/\/www.vpascode.com\/vn\/docs\/vpascode-docs\/mermaid-js-playbook\/mermaid-js-architecture-diagram-syntax-layout-guide\/#breadcrumb"},"inLanguage":"vi","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.vpascode.com\/vn\/docs\/vpascode-docs\/mermaid-js-playbook\/mermaid-js-architecture-diagram-syntax-layout-guide\/"]}]},{"@type":"ImageObject","inLanguage":"vi","@id":"https:\/\/www.vpascode.com\/vn\/docs\/vpascode-docs\/mermaid-js-playbook\/mermaid-js-architecture-diagram-syntax-layout-guide\/#primaryimage","url":"https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/07\/img_6a4de8359768b.png","contentUrl":"https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/07\/img_6a4de8359768b.png"},{"@type":"BreadcrumbList","@id":"https:\/\/www.vpascode.com\/vn\/docs\/vpascode-docs\/mermaid-js-playbook\/mermaid-js-architecture-diagram-syntax-layout-guide\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.vpascode.com\/vn\/"},{"@type":"ListItem","position":2,"name":"Lean Docs","item":"https:\/\/www.vpascode.com\/vn\/docs\/%ld_collection%\/"},{"@type":"ListItem","position":3,"name":"H\u01b0\u1edbng d\u1eabn c\u00fa ph\u00e1p v\u00e0 b\u1ed1 c\u1ee5c s\u01a1 \u0111\u1ed3 ki\u1ebfn tr\u00fac Mermaid.js"}]},{"@type":"WebSite","@id":"https:\/\/www.vpascode.com\/vn\/#website","url":"https:\/\/www.vpascode.com\/vn\/","name":"VPasCode","description":"by Visual Paradigm","publisher":{"@id":"https:\/\/www.vpascode.com\/vn\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.vpascode.com\/vn\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"vi"},{"@type":"Organization","@id":"https:\/\/www.vpascode.com\/vn\/#organization","name":"VPasCode","url":"https:\/\/www.vpascode.com\/vn\/","logo":{"@type":"ImageObject","inLanguage":"vi","@id":"https:\/\/www.vpascode.com\/vn\/#\/schema\/logo\/image\/","url":"https:\/\/www.vpascode.com\/vn\/wp-content\/uploads\/sites\/12\/2026\/06\/cropped-vp-online-logo-v1.png","contentUrl":"https:\/\/www.vpascode.com\/vn\/wp-content\/uploads\/sites\/12\/2026\/06\/cropped-vp-online-logo-v1.png","width":128,"height":138,"caption":"VPasCode"},"image":{"@id":"https:\/\/www.vpascode.com\/vn\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/www.vpascode.com\/vn\/wp-json\/wp\/v2\/ld_docs\/2078","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.vpascode.com\/vn\/wp-json\/wp\/v2\/ld_docs"}],"about":[{"href":"https:\/\/www.vpascode.com\/vn\/wp-json\/wp\/v2\/types\/ld_docs"}],"author":[{"embeddable":true,"href":"https:\/\/www.vpascode.com\/vn\/wp-json\/wp\/v2\/users\/3"}],"wp:attachment":[{"href":"https:\/\/www.vpascode.com\/vn\/wp-json\/wp\/v2\/media?parent=2078"}],"wp:term":[{"taxonomy":"ld_collection","embeddable":true,"href":"https:\/\/www.vpascode.com\/vn\/wp-json\/wp\/v2\/ld_collection?post=2078"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}