Oxide glasses are brittle and shatter upon impact. In contrast some metallic glasses show extensive ductility. Combined with their high strength this makes metallic glasses attractive as structural material. However, why only some of them show ductility has eluded explanation for a long time. We show that ductility is intimately related to the density of low energy barriers in potential energy landscape due to structural frustration, which results in non-affine deformation through avalanche of local atomic rearrangement. The extent of non-affine deformation can be quantified through diffraction measurement under stress. In particular there is a universal threshold value for ductile-brittle transition. We discuss how the degree of structural frustration is related to the nature of atomic bond and liquid fragility, and how to design new alloys with greater structural frustration. This work is supported by the Department of Energy, Office of Science, Basic Energy Sciences, Materials Science and Engineering Division.