More factors:
Embassy security and responsiblity isn't all that easy to attain due to multiple agency involements and a lot more!
What made the consulate office in Benghazi more vulnerable than the embassy in Tripoli?
The embassy in Tripoli is a fairly new facility. It was constructed in 2009 in accordance with security standards established by the Diplomatic Security Service at the State Department. The building in Benghazi was basically a villa that was being rented to serve as a temporary consulate. So it was built in accordance with your normal residential security standards for Libya. It was not made to withstand rocket or bomb attacks. So it was not a very secure facility at all.
How can any building be protected against rocket-propelled grenades?
Inman facilities are designed and engineered and constructed to withstand attacks from weapons like rocket-propelled grenades. (The Inman Commission was established in 1985 after the U.S. Embassy bombings in Beirut, Lebanon, to develop new security standards.) There are certain thicknesses of the walls and certain types of reinforced concrete, certain angles that the walls have, and distance to the street that make them much more difficult to attack. The embassy in Tripoli, Libya, and the one in Sanaa, Yemen, which was just attacked today, are Inman facilities, so it's going to be much more difficult to damage them.
Who's responsible for security at an embassy -- the host country or the embassy itself?
There's a dual responsibility. Under the Vienna Convention on Diplomatic Relations, the host country is responsible for security of embassies. However, experience has taught the Americans that they can't rely on the host country to do that. They've experienced big losses in places like Kuwait, and Beirut a couple of times, even in Islamabad, Pakistan, when it was burnt to the ground. So they've learned they need to establish their own security bureaucracy to take care of that, and the Diplomatic Security Service (or law enforcement arm of the State Department) came into being in the mid-1980s.