问题描述
我知道 LDAP 用于提供一些信息并帮助促进授权.
I know that LDAP is used to provide some information and to help facilitate authorization.
但是 LDAP 的其他用途是什么?
But what are the other usages of LDAP?
推荐答案
我将重点介绍为什么使用 LDAP,而不是什么是 LDAP.
I will focus on why using LDAP, not what is LDAP.
使用模式类似于人们使用借书证或电话簿的方式.当您有一个需要一次写入/更新,多次读取/查询"的任务时,您可能会考虑使用 LDAP.LDAP 旨在为大规模数据集提供极快的读取/查询性能.通常,您只想为每个条目存储一小部分信息.与读取/查询相比,添加/删除/更新性能相对较慢,因为假设您不经常更新".
The use model is similar like how people use library cards or phonebooks. When you have a task that requires "write/update once, read/query many times", you might consider using LDAP. LDAP is designed to provide extremely fast read/query performance for a large scale of dataset. Typically you want to store only a small piece of information for each entry. The add/delete/update performance is relatively slower compared with read/query because the assumption is that you don’t do "update" that often.
假设您有一个网站,该网站拥有一百万注册用户,每秒有数千个页面请求.如果没有 LDAP,每次用户单击页面时,即使是查看静态页面,您也可能需要与数据库交互以验证用户 ID 及其在此登录会话中的数字签名.显然,对数据库进行用户验证的查询将成为您的瓶颈.通过使用 LDAP,您可以轻松卸载用户验证并获得显着的性能改进.本质上,在本示例中,LDAP 是数据库之外的另一个优化层,用于提高性能,而不是替换任何数据库功能.
Imagine you have a website that has a million registered users with thousands of page requests per second. Without LDAP, every time users click a page, even for static page viewing, you will probably need to interact with your database to validate the user ID and its digital signature for this login session. Obviously, the query to your database for user-validation will become your bottleneck. By using LDAP, you can easily offload the user validation and gain significant performance improvement. Essentially, in this example, LDAP is another optimization layer outside your database to enhance performance, not replacing any database functions.
LDAP 不仅仅用于用户验证,任何具有以下属性的任务都可能是 LDAP 的一个很好的用例:
LDAP is not just for user validation, any task that has the following properties might be a good use case for LDAP:
您需要多次定位一条数据并且希望它快速
You need to locate ONE piece of data many times and you want it fast
你不关心不同数据之间的逻辑和关系
You don’t care about the logic and relations between different data
您不会经常更新、添加或删除数据
You don’t update, add, or delete the data very often
每个数据条目的大小都很小
The size of each data entry is small
您不介意将所有这些小块数据集中在一个地方
You don’t mind having all these small pieces of data at a centralized place
这篇关于LDAP 用于什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!